update #5

Open
mdebray wants to merge 231 commits from update into main
2 changed files with 8 additions and 1 deletions
Showing only changes of commit 82219dd899 - Show all commits

View file

@ -78,7 +78,7 @@ class PdfActionsManager {
imgContainer.classList.toggle("split-before");
}
setActions({ movePageTo, addPdfs, rotateElement }) {
setActions({ movePageTo, addFiles, rotateElement }) {
this.movePageTo = movePageTo;
this.addFiles = addFiles;
this.rotateElement = rotateElement;

View file

@ -53,6 +53,13 @@ class PdfContainer {
const childArray = Array.from(this.pagesContainer.childNodes);
const startIndex = childArray.indexOf(startElement);
const endIndex = childArray.indexOf(endElement);
// Check & remove page number elements here too if they exist because Firefox doesn't fire the relevant event on page move.
const pageNumberElement = startElement.querySelector(".page-number");
if (pageNumberElement) {
startElement.removeChild(pageNumberElement);
}
this.pagesContainer.removeChild(startElement);
if (!endElement) {
this.pagesContainer.append(startElement);