fullscreen mouse scroll fix
This commit is contained in:
@@ -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
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user