Require Ctrl+Mouse Wheel for modifier weight adjustment

The current behavior is just too annoying, and scrolling the page is a much more frequent activity than tweaking the weights.
This commit is contained in:
patriceac 2022-11-27 01:35:47 -08:00
parent 347fa0fda1
commit da41a74efc
2 changed files with 33 additions and 31 deletions

View File

@ -82,7 +82,7 @@
</div>
<div id="editor-inputs-tags-container" class="row">
<label>Image Modifiers: <small>(click an Image Modifier to remove it)</small></label>
<label>Image Modifiers: <small>(click an Image Modifier to remove it, Ctrl+Mouse Wheel to adjust an Image Modifier's weight)</small></label>
<div id="editor-inputs-tags-list"></div>
</div>

View File

@ -18,6 +18,7 @@
let overlays = document.querySelector('#editor-inputs-tags-list').querySelectorAll('.modifier-card-overlay')
overlays.forEach (i => {
i.onwheel = (e) => {
if (e.ctrlKey == true) {
e.preventDefault()
const delta = Math.sign(event.deltaY)
@ -55,6 +56,7 @@
}
}
}
}
})
}
})()