diff --git a/src/public/app/services/note_content_renderer.js b/src/public/app/services/note_content_renderer.js index 6ce23fd8a..12c094cf4 100644 --- a/src/public/app/services/note_content_renderer.js +++ b/src/public/app/services/note_content_renderer.js @@ -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($("