Inline 3D viewers in articles use content width (model-viewer-inline); standalone model pages stay full-bleed

This commit is contained in:
trilium-share-gruvbox
2026-08-28 20:20:48 +02:00
parent 6b9b458e97
commit af584101eb
3 changed files with 10 additions and 2 deletions
+2
View File
@@ -363,6 +363,7 @@
if (!m) return;
var href = a.getAttribute("href");
var el = makeViewer(name);
el.classList.add("model-viewer-inline");
a.replaceWith(el);
initViewer(el, href, m[0]);
});
@@ -384,6 +385,7 @@
var mm = t.match(MODEL_RE);
if (!mm) return;
var el = makeViewer(t);
el.classList.add("model-viewer-inline");
a.replaceWith(el);
initViewer(el, "api/notes/" + art.id + "/download", mm[0]);
});