diff --git a/ui/index.html b/ui/index.html index edbccf97..c21514d1 100644 --- a/ui/index.html +++ b/ui/index.html @@ -82,7 +82,7 @@
- +
diff --git a/ui/plugins/ui/Modifiers-wheel.plugin.js b/ui/plugins/ui/Modifiers-wheel.plugin.js index 0f75c2e1..da7781b5 100644 --- a/ui/plugins/ui/Modifiers-wheel.plugin.js +++ b/ui/plugins/ui/Modifiers-wheel.plugin.js @@ -18,40 +18,42 @@ let overlays = document.querySelector('#editor-inputs-tags-list').querySelectorAll('.modifier-card-overlay') overlays.forEach (i => { i.onwheel = (e) => { - e.preventDefault() - - const delta = Math.sign(event.deltaY) - let s = i.parentElement.getElementsByClassName('modifier-card-label')[0].getElementsByTagName("p")[0].innerText - if (delta < 0) { - // wheel scrolling up - if (s.substring(0, 1) == '[' && s.substring(s.length-1) == ']') { - s = s.substring(1, s.length - 1) - } - else - { - if (s.substring(0, 10) !== '('.repeat(10) && s.substring(s.length-10) !== ')'.repeat(10)) { - s = '(' + s + ')' + if (e.ctrlKey == true) { + e.preventDefault() + + const delta = Math.sign(event.deltaY) + let s = i.parentElement.getElementsByClassName('modifier-card-label')[0].getElementsByTagName("p")[0].innerText + if (delta < 0) { + // wheel scrolling up + if (s.substring(0, 1) == '[' && s.substring(s.length-1) == ']') { + s = s.substring(1, s.length - 1) + } + else + { + if (s.substring(0, 10) !== '('.repeat(10) && s.substring(s.length-10) !== ')'.repeat(10)) { + s = '(' + s + ')' + } } } - } - else{ - // wheel scrolling down - if (s.substring(0, 1) == '(' && s.substring(s.length-1) == ')') { - s = s.substring(1, s.length - 1) - } - else - { - if (s.substring(0, 10) !== '['.repeat(10) && s.substring(s.length-10) !== ']'.repeat(10)) { - s = '[' + s + ']' + else{ + // wheel scrolling down + if (s.substring(0, 1) == '(' && s.substring(s.length-1) == ')') { + s = s.substring(1, s.length - 1) + } + else + { + if (s.substring(0, 10) !== '['.repeat(10) && s.substring(s.length-10) !== ']'.repeat(10)) { + s = '[' + s + ']' + } } } - } - i.parentElement.getElementsByClassName('modifier-card-label')[0].getElementsByTagName("p")[0].innerText = s - // update activeTags - for (let it = 0; it < overlays.length; it++) { - if (i == overlays[it]) { - activeTags[it].name = s - break + i.parentElement.getElementsByClassName('modifier-card-label')[0].getElementsByTagName("p")[0].innerText = s + // update activeTags + for (let it = 0; it < overlays.length; it++) { + if (i == overlays[it]) { + activeTags[it].name = s + break + } } } }