From 9cbf0107a273e243788f1ca73d1e11c0b2dc21ac Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Tue, 18 Oct 2022 00:02:41 +0200 Subject: [PATCH] [Organization] If selection mode it will not active hover action page buttons --- public/js/organization.js | 8 +++++++- templates/organization.html.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/public/js/organization.js b/public/js/organization.js index e3a488b..12a70d7 100644 --- a/public/js/organization.js +++ b/public/js/organization.js @@ -131,6 +131,9 @@ var loadPDF = async function(pdfBlob, filename, pdfIndex) { if(isDraggedMode()) { return false; } + if(isSelectionMode()) { + return false; + } this.querySelector('.container-resize').classList.add('d-none'); this.querySelector('.canvas-pdf').classList.add('shadow-lg'); this.querySelector('.canvas-pdf').style.border = '2px dashed #777'; @@ -441,10 +444,13 @@ var updatePageState = function(page) { page.querySelector('.page-title').classList.remove('d-none'); page.classList.add('border-secondary', 'bg-secondary'); page.classList.remove('border-transparent', 'bg-transparent'); + page.querySelector('.btn-select').classList.remove('d-none') + } + + if(isPageHover(page) && !isPageDeleted(page) && !isPageDragged(page) && !isPageSelected(page) && !isDraggedMode() && !isSelectionMode()) { page.querySelector('.btn-rotate').classList.remove('d-none'); page.querySelector('.btn-download').classList.remove('d-none'); page.querySelector('.btn-delete').classList.remove('d-none'); - page.querySelector('.btn-select').classList.remove('d-none') page.querySelector('.btn-drag').classList.remove('d-none'); } diff --git a/templates/organization.html.php b/templates/organization.html.php index 7dca3b1..ed97153 100644 --- a/templates/organization.html.php +++ b/templates/organization.html.php @@ -152,6 +152,6 @@ - + \ No newline at end of file