fullscreen mouse scroll fix

This commit is contained in:
TinyTerra
2023-09-24 21:13:22 +10:00
parent 402914224b
commit 9f36e9fc83
2 changed files with 25 additions and 7 deletions
+1
View File
@@ -44,6 +44,7 @@ Navigate to the **_ComfyUI/custom_nodes_** directory with cmd, and run:
+ 'Right arrow' => _Select Image to the right_
+ 'shift + right arrow' => _Select Image 5 to the right_
+ 'ctrl + right arrow' => _Select last Image_
+ 'mouse scroll' => _Select image to Left/Right_
+ 'esc' => _Close Fullscreen Mode_
**Embedding Auto Complete**
+24 -7
View File
@@ -151,13 +151,30 @@ function _handleArrowKeys(e) {
function _handleWheelEvent(e) {
e.stopPropagation();
if (e.deltaY > 0) {
// Scrolling down
ttN_FullscreenImageIndex += 1;
} else if (e.deltaY < 0) {
// Scrolling up
ttN_FullscreenImageIndex -= 1;
if (ttN_FullscreenImageIndex < 0) ttN_FullscreenImageIndex = 0;
var InvertMenuScrolling = localStorage.getItem('Comfy.Settings.Comfy.InvertMenuScrolling')
console.log("InvertMenuScrolling", InvertMenuScrolling)
if (InvertMenuScrolling === "true") {
console.log('yes')
if (e.deltaY > 0) {
// Scrolling down
ttN_FullscreenImageIndex += 1;
} else if (e.deltaY < 0) {
// Scrolling up
ttN_FullscreenImageIndex -= 1;
if (ttN_FullscreenImageIndex < 0) ttN_FullscreenImageIndex = 0;
}
} else {
console.log('no')
if (e.deltaY < 0) {
// Scrolling down
ttN_FullscreenImageIndex += 1;
} else if (e.deltaY > 0) {
// Scrolling up
ttN_FullscreenImageIndex -= 1;
if (ttN_FullscreenImageIndex < 0) ttN_FullscreenImageIndex = 0;
}
}
updateImageElements()
}