This commit is contained in:
Julie Blanc 2026-02-23 23:30:33 +01:00
parent 811558f4d8
commit 31bb24548f
19 changed files with 189 additions and 110 deletions

View file

@ -33,6 +33,27 @@ export default class sidenotes extends Handler {
// note.style.left = "0px";
// });
let notes = content.querySelectorAll(this.notesClass);
notes.forEach(function (note, index) {
note.style.position = "absolute";
note.style.top = "0px";
note.style.left = "0px";
});
}
afterPageLayout(pageElement, page, breakToken) {
let pageBox = pageElement.querySelector(".pagedjs_pagebox");
var div = document.createElement('div');
div.classList.add("note-container")
pageBox.appendChild(div)
let notes = pageElement.querySelectorAll(this.notesClass);
notes.forEach(function (note, index) {
// console.log(note);
div.appendChild(note);
note.style.position = "relative";
});
}