mirror of
https://github.com/Investigamer/cardconjurer.git
synced 2025-07-27 05:14:53 -05:00
additional checkbox for showing guidelines
This commit is contained in:
@@ -2306,6 +2306,7 @@ if (document.querySelector('#lockSetSymbolURL').checked) {
|
||||
bindInputs('#frame-editor-hsl-hue', '#frame-editor-hsl-hue-slider');
|
||||
bindInputs('#frame-editor-hsl-saturation', '#frame-editor-hsl-saturation-slider');
|
||||
bindInputs('#frame-editor-hsl-lightness', '#frame-editor-hsl-lightness-slider');
|
||||
bindInputs('#show-guidelines', '#show-guidelines-2', true);
|
||||
|
||||
// Load / init whatever
|
||||
loadScript('/js/frames/groupStandard-3.js');
|
||||
|
11
js/main-1.js
11
js/main-1.js
@@ -107,9 +107,14 @@ urlInputs.forEach(element => {
|
||||
});
|
||||
|
||||
//bind two inputs to match values
|
||||
function bindInputs(query1, query2) {
|
||||
function bindInputs(query1, query2, checkbox = false) {
|
||||
var e1 = document.querySelector(query1);
|
||||
var e2 = document.querySelector(query2);
|
||||
e1.oninput = (event) => {e2.value = e1.value;}
|
||||
e2.oninput = (event) => {e1.value = e2.value;}
|
||||
if (checkbox) {
|
||||
e1.oninput = (event) => {e2.checked = e1.checked;}
|
||||
e2.oninput = (event) => {e1.checked = e2.checked;}
|
||||
} else {
|
||||
e1.oninput = (event) => {e2.value = e1.value;}
|
||||
e2.oninput = (event) => {e1.value = e2.value;}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user