layout-3
This commit is contained in:
parent
811558f4d8
commit
31bb24548f
19 changed files with 189 additions and 110 deletions
|
|
@ -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";
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue