Compare commits

...

1 Commits

Author SHA1 Message Date
Terry Jia
db39a13405 add support for cmd + wheel to zoom in/out on Mac 2025-08-20 21:12:48 -04:00

View File

@@ -3499,8 +3499,8 @@ export class LGraphCanvas
// Detect if this is a trackpad gesture or mouse wheel
const isTrackpad = this.pointer.isTrackpadGesture(e)
if (e.ctrlKey || LiteGraph.canvasNavigationMode === 'legacy') {
// Legacy mode or standard mode with ctrl - use wheel for zoom
if (e.ctrlKey || e.metaKey || LiteGraph.canvasNavigationMode === 'legacy') {
// Legacy mode or standard mode with ctrl/cmd - use wheel for zoom
if (isTrackpad) {
// Trackpad gesture - use smooth scaling
scale *= 1 + e.deltaY * (1 - this.zoom_speed) * 0.18