mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
Test de l'interface avec le mode séléction active forcé
This commit is contained in:
parent
1687f7c0ff
commit
ff1c0b5cfb
@ -12,7 +12,8 @@ var loadingTask = pdfjsLib.getDocument(url);
|
|||||||
loadingTask.promise.then(function(pdf) {
|
loadingTask.promise.then(function(pdf) {
|
||||||
|
|
||||||
var fontCaveat = null;
|
var fontCaveat = null;
|
||||||
var addLock = false;
|
var forceAddLock = true;
|
||||||
|
var addLock = forceAddLock;
|
||||||
var copiedObject = null;
|
var copiedObject = null;
|
||||||
var activeCanvas = null;
|
var activeCanvas = null;
|
||||||
var activeCanvasPointer = null;
|
var activeCanvasPointer = null;
|
||||||
@ -215,6 +216,9 @@ loadingTask.promise.then(function(pdf) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
var stateAddLock = function(state) {
|
var stateAddLock = function(state) {
|
||||||
|
if(forceAddLock) {
|
||||||
|
state = true;
|
||||||
|
}
|
||||||
var checkbox = document.getElementById('add-lock-checkbox');
|
var checkbox = document.getElementById('add-lock-checkbox');
|
||||||
var input_selected = document.querySelector('input[name="svg_2_add"]:checked');
|
var input_selected = document.querySelector('input[name="svg_2_add"]:checked');
|
||||||
|
|
||||||
@ -227,16 +231,17 @@ loadingTask.promise.then(function(pdf) {
|
|||||||
checkbox.disabled = false;
|
checkbox.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(addLock) {
|
document.querySelectorAll('.btn-svg').forEach(function(item) {
|
||||||
|
item.style.borderWidth = "1px";
|
||||||
|
});
|
||||||
|
|
||||||
|
if(addLock && input_selected) {
|
||||||
var svgButton = document.querySelector('.btn-svg[for="'+input_selected.id+'"]');
|
var svgButton = document.querySelector('.btn-svg[for="'+input_selected.id+'"]');
|
||||||
svgButton.style.borderWidth = "2px";
|
svgButton.style.borderWidth = "2px";
|
||||||
checkbox.checked = true;
|
checkbox.checked = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelectorAll('.btn-svg').forEach(function(item) {
|
|
||||||
item.style.borderWidth = "1px";
|
|
||||||
});
|
|
||||||
checkbox.checked = false;
|
checkbox.checked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user