Skip to content

Commit

Permalink
Fixes #633 - Force the with of the notes pane when preview pane is re…
Browse files Browse the repository at this point in the history
…sized
  • Loading branch information
aumouvantsillage committed Nov 17, 2024
1 parent 50247f6 commit 67f2ce4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion locales/messages.pot
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2024-11-13 08:02:+0000\n"
"POT-Creation-Date: 2024-11-17 08:29:+0000\n"
"Project-Id-Version: PACKAGE VERSION\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
Expand Down
7 changes: 7 additions & 0 deletions src/js/presenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ window.addEventListener("load", () => {
p.window = iframes[i].contentWindow;
});

// Prevent the notes pane to change size when its content is updated.
const preview = document.querySelector(".sozi-frame-preview");
const notes = document.querySelector(".sozi-notes");
new ResizeObserver(() => {
notes.style.width = `calc(100vw - ${preview.offsetWidth}px`;
}).observe(preview);

// Open a new window for the main presentation view.
presWindow = window.open(iframes[0].src, "sozi-presentation", "width=600, height=400, scrollbars=yes, toolbar=yes");
try {
Expand Down

0 comments on commit 67f2ce4

Please sign in to comment.