mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
replace excalidraw.com asset in svg with EXCALIDRAW_ASSET_PATH, clean up code
This commit is contained in:
@@ -142,6 +142,9 @@ async function getRenderedContent(note, options = {}) {
|
||||
$renderedContent.append($content);
|
||||
}
|
||||
else if (type === 'canvas-note') {
|
||||
// make sure surrounding container has size of what is visible. Then image is shrinked to its boundaries
|
||||
$renderedContent.css({height: "100%", width:"100%"});
|
||||
|
||||
const noteComplement = await froca.getNoteComplement(note.noteId);
|
||||
const content = noteComplement.content || "";
|
||||
|
||||
@@ -153,7 +156,7 @@ async function getRenderedContent(note, options = {}) {
|
||||
* maxWidth: size down to 100% (full) width of container but do not enlarge!
|
||||
* height:auto to ensure that height scales with width
|
||||
*/
|
||||
$renderedContent.append($(svg).css({maxWidth: "100%", height: "auto"}));
|
||||
$renderedContent.append($(svg).css({maxWidth: "100%", maxHeight: "100%", height: "auto", width: "auto"}));
|
||||
} catch(err) {
|
||||
console.error("error parsing content as JSON", content, err);
|
||||
$renderedContent.append($("<div>").text("Error parsing content. Please check console.error() for more details."));
|
||||
|
||||
Reference in New Issue
Block a user