1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

[Organization] Click on drag button active dragging mode

This commit is contained in:
Vincent LAURENT 2022-10-09 00:55:13 +02:00
parent 653036f28d
commit 233c9a8e1e

View File

@ -176,9 +176,6 @@ var loadPDF = async function(pdfBlob, filename, pdfIndex) {
}); });
canvasContainer.querySelector('.btn-drag').addEventListener('click', function(e) { canvasContainer.querySelector('.btn-drag').addEventListener('click', function(e) {
e.stopPropagation(); e.stopPropagation();
if(!is_mobile()) {
return;
}
toggleDragPage(this.parentNode); toggleDragPage(this.parentNode);
}); });
canvasContainer.querySelector('.btn-drag-here_mobile').addEventListener('click', function(e) { canvasContainer.querySelector('.btn-drag-here_mobile').addEventListener('click', function(e) {
@ -438,12 +435,12 @@ var updatePageState = function(page) {
page.querySelector('.btn-restore').classList.remove('d-none'); page.querySelector('.btn-restore').classList.remove('d-none');
} }
if(isPageSelected(page) != isPageDragged(page)) { if(isPageSelected(page) && !isDraggedMode()) {
page.querySelector('.page-title').classList.remove('d-none'); page.querySelector('.page-title').classList.remove('d-none');
page.classList.add('border-primary', 'shadow-sm', 'bg-primary'); page.classList.add('border-primary', 'shadow-sm', 'bg-primary');
page.classList.remove('border-transparent', 'bg-transparent', 'border-secondary', 'bg-secondary'); page.classList.remove('border-transparent', 'bg-transparent', 'border-secondary', 'bg-secondary');
page.querySelector('.btn-select').classList.add('text-primary'); page.querySelector('.btn-select').classList.add('text-primary');
page.querySelector('.btn-select').classList.remove('d-none') page.querySelector('.btn-select').classList.remove('d-none');
} }
if(isPageDragged(page)) { if(isPageDragged(page)) {