Commit Graph

4977 Commits (c07cce4fb0e619f82f649d9ab1725e0c02fbbfc9)

Author SHA1 Message Date
dimitrieh c07cce4fb0
Make Alt/Space scroll zoom speed match trackpad pinch zoom
Alt+scroll and Space+scroll were using fixed zoom steps (0.06/0.08),
making them zoom much faster than trackpad pinch zoom which uses
proportional scaling (0.005 * delta).

Changed to use trackpad-style proportional zoom for consistent feel
across all zoom input methods.
2025-10-14 10:04:31 +01:00
dimitrieh 45f3b01125
Fix spacebar hold causing unwanted canvas scrolling
When holding spacebar, browsers fire repeated keydown events. The
previous implementation only prevented default on the first keydown,
allowing subsequent events to trigger browser's space-scroll behavior.

Moved preventDefault() outside conditional to block all spacebar events.
2025-10-14 10:04:31 +01:00
dimitrieh 3bef2d6481
Improve minimap auto-show behavior
- Remove view:selection-changed listener to prevent minimap showing on node selection
- Remove view:navigate emissions from pan mode entry points (no longer shows when starting pan)
- Add view:navigate emission to touchpad scroll handler for consistent behavior
- Minimap now only appears during actual panning and zooming actions

The minimap previously showed when selecting nodes or just starting a pan gesture,
causing unnecessary flashing. Now it only appears during actual navigation (pan/zoom)
and fades after 2 seconds of inactivity.
2025-10-14 10:04:31 +01:00
dimitrieh 08a5d04df6
Enable diagonal trackpad panning
- Prevent browser's native axis-locked scroll behavior
- Manually handle both deltaX and deltaY in wheel event handler
- Update touch-action CSS from pan-x pan-y to manipulation
- Add documentation of fix to CANVAS_INTERACTION.md

Fixes issue where trackpad scrolling was restricted to horizontal
or vertical movement only, not both simultaneously.
2025-10-14 10:04:31 +01:00
Dimitrie Hoekstra 6725fd6426
Hide scrollbars and add auto-show/hide minimap on navigation
- Hide scrollbars on canvas while keeping it scrollable
- Add minimap auto-show functionality that triggers on zoom and pan
- Minimap appears for 2 seconds during navigation then fades out
- Add smooth fade in/out animations for minimap visibility
- Emit view:navigate events for all zoom and pan operations
- Minimap stays visible if manually toggled with button
2025-10-14 10:04:31 +01:00
Dimitrie Hoekstra 7dca55fdb8
Add dynamic minimum zoom recalculation on viewport resize
- Recalculate minimum zoom when window resizes to ensure canvas fits properly
- Automatically adjust zoom if current level falls below new minimum after resize
- Ensures canvas boundaries remain appropriate for different viewport sizes
2025-10-14 10:04:30 +01:00
Dimitrie Hoekstra b4c3faf034
Implement dynamic zoom limits to match canvas boundaries
- Add calculateMinZoom() function to dynamically compute minimum zoom based on viewport size
- Ensure canvas always covers the entire viewport (no empty space visible)
- Use 'cover' behavior: zoom limited so canvas fills viewport completely
- Update all zoom methods (buttons, wheel, trackpad, touch) to use calculated minimum
- Prevent zooming out beyond what's needed to fill the viewport with canvas content
2025-10-14 10:04:30 +01:00
Dimitrie Hoekstra 4938833227
Fix zoom gesture detection after two-finger panning
Clear touchStartTime timeout when entering two-finger pan mode to prevent
interference with subsequent zoom gestures. The timeout was being used for
long-press detection but wasn't cleared during pan, causing the next
gesture to incorrectly maintain the old touch state.
2025-10-14 10:04:30 +01:00
Dimitrie Hoekstra bf73261ecb
Prevent UI pinch-to-zoom while keeping canvas zoomable
- Add touch-action CSS to prevent pinch-zoom on UI elements
- Apply touch-action: pan-x pan-y to html, body, and editor
- Apply touch-action: none to canvas for custom gestures
- Add JavaScript prevention for touchpad pinch on non-canvas areas
- Block Ctrl+wheel events outside the workspace chart
2025-10-14 10:04:30 +01:00
Dimitrie Hoekstra 3e2fb85821
Add two-finger panning and spacebar+click panning
- Implement spacebar+left-click panning for desktop
- Add two-finger pan gesture for touch devices
- Use mode locking to prevent laggy gesture switching
- Lock into pan or zoom mode based on initial movement
- Fix focal point regression caused by pan/zoom interaction
- Improve gesture detection with better thresholds (10px for zoom, 5px for pan)
2025-10-14 10:04:30 +01:00
Dimitrie Hoekstra 541977312e
Improve zoom smoothness and control
- Make mouse wheel zoom smooth without jarring animations
- Reduce zoom acceleration from 2x to 1.2x max
- Slow down zoom velocity by 40-50% for better control
- Add asymmetric zoom speeds (zoom out slower than zoom in)
- Reduce acceleration range to 0.7-1.1 for gentler transitions
- Disable legacy mousewheel handler in favor of modern wheel event
2025-10-14 10:04:30 +01:00
Dimitrie Hoekstra 782821b590
Fix zoom focal point stability at canvas edges
- Store focal point in workspace coordinates instead of screen coordinates
- Prevents focal point drift when scroll changes due to canvas boundaries
- Maintains consistent zoom focus even when view shifts at edges
- Add early return in zoomView() to prevent unnecessary updates at zoom limits
- Improve gesture state management for both trackpad and touch gestures
2025-10-14 10:04:30 +01:00
Dimitrie Hoekstra 49222c5737
Fix trackpad zoom direction - spreading fingers now zooms in
- Inverted deltaY value for trackpad pinch gestures
- Matches standard macOS trackpad behavior
- Spreading fingers (negative deltaY) zooms in
- Pinching fingers (positive deltaY) zooms out
2025-10-14 10:04:29 +01:00
Dimitrie Hoekstra eaf68815fd
Implement smooth zoom functionality with pinch-to-zoom support
- Add smooth zoom animation with 125ms duration and easing curves
- Implement space+scroll zoom mode alongside existing Alt+scroll
- Fix pinch-to-zoom with proper ratio-based scaling and fixed focal point
- Add gesture state management for consistent zoom behavior
- Enhance spacebar handling to prevent scroll artifacts
- Fix zoom button layout (correct zoom in/out direction)
- Add zoom animation utilities (view-zoom-animator.js)
- Add zoom configuration constants (view-zoom-constants.js)
- Fix scale lock issues with improved tolerance handling
- Update Gruntfile to include new zoom modules in build

Features implemented:
- Smooth animated zoom transitions (125ms with ease-out)
- Space+scroll for zoom mode
- Fixed focal point during pinch gestures
- No scroll artifacts when pressing space
- Proper state management when cursor leaves canvas
- Natural acceleration/deceleration curves

Known issue: Trackpad pinch-to-zoom needs additional work on macOS
2025-10-14 10:04:29 +01:00
claude[bot] bd51b0c153
feat: Add enhanced zoom and scroll features
- Added space+scroll zoom functionality
- Implemented cursor-centered zoom (focuses on cursor position)
- Enhanced pinch-to-zoom with trackpad support (Ctrl+wheel)
- Added momentum scrolling with edge bounce animation
- Improved touch pinch gesture handling with proper center tracking

Co-authored-by: Dimitrie Hoekstra <dimitrieh@users.noreply.github.com>
2025-10-14 10:04:28 +01:00
Nick O'Leary 2f2199e71b
Bump for 4.1.1 release 2025-10-13 11:37:18 +01:00
Nick O'Leary 7f6abd15b0
Merge pull request #5310 from node-red/5236-add-missing-log
Simplify error logging when issue in settings file
2025-10-13 11:33:44 +01:00
Nick O'Leary 535366d742
Simplify error logging when issue in settings file 2025-10-13 11:26:54 +01:00
Nick O'Leary c9b7263e21
Merge pull request #5300 from node-red/5287-fix-httpin-middleware-handling
Do not assume rawBody middleware is last in stack when moving it
2025-10-13 11:17:20 +01:00
Nick O'Leary 2c1fe60d25
Merge pull request #5307 from GogoVega/5245-filter-suggestions-for-disabled-set
Filter suggestions to ensure only enabled set are shown
2025-10-13 11:12:12 +01:00
Nick O'Leary b5edcf6ac9
Update packages/node_modules/@node-red/editor-client/src/js/ui/view.js 2025-10-13 11:06:30 +01:00
Nick O'Leary 6d1fd0b616
Show all catalog items if small enough and no search time provided 2025-10-13 10:56:40 +01:00
GogoVega c1cd5d9593
Filter suggestions to ensure only enabled set are shown 2025-10-10 18:16:25 +02:00
Nick O'Leary 5427d43a98
Merge pull request #5306 from node-red/5244-redraw-after-clearing-suggestion
Force a redraw after clearing suggested flow on mouse down
2025-10-10 16:03:36 +01:00
Nick O'Leary f4cbebca66
Merge pull request #5299 from joebordes/i18n_003
i18n(NodeRed) update ES translation files to latest code base
2025-10-10 15:50:48 +01:00
Nick O'Leary 4173e9a71b
Force a redraw after clearing suggested flow on mouse down 2025-10-10 15:47:31 +01:00
Nick O'Leary e85476b925
Merge pull request #5301 from node-red/5245-filter-suggestions-for-known-types
Filter suggestions to ensure only known types are shown
2025-10-10 15:06:00 +01:00
GogoVega 7c1505eeaf
Use the action label if provided 2025-10-10 13:38:03 +02:00
Nick O'Leary 00b879f855
Filter suggestions to ensure only known types are shown 2025-10-10 12:02:36 +01:00
Nick O'Leary 471f0d8bea
Do not assume rawBody middleware is last in stack when moving it 2025-10-10 11:35:27 +01:00
Nick O'Leary 0e8b403ec8
Merge branch 'master' into 5264-fix-sfpath-envvar 2025-10-10 11:20:06 +01:00
Joe Bordes fd4e78089b i18n(NodeRed) update ES translation files to latest code base 2025-10-09 17:12:38 +02:00
Nick O'Leary 0519b94786
Fix jsonata error reporting in Inject node
Fixes #5270
2025-10-09 14:50:52 +01:00
Nick O'Leary 34c59a58e5
Ensure flow property is set on sf instance nodes so NR_SUBFLOW_PATH can be evaluated 2025-10-09 14:42:27 +01:00
Nick O'Leary f60f12cf47
Merge pull request #5296 from node-red/5242-fix-subflow-quickadd
Handle subflow virtual port nodes when generating quick-add context
2025-10-09 14:10:14 +01:00
Nick O'Leary 39975fd46a
Handle subflow virtual port nodes when generating quick-add context 2025-10-09 13:56:19 +01:00
Nick O'Leary 947feb09b3
Ignore disabled nodes when checking for dependency modules 2025-10-09 13:15:49 +01:00
Nick O'Leary 81959f8ca4
Update all the package files 2025-10-09 11:32:14 +01:00
Nick O'Leary b0485b1229
Merge pull request #5293 from GogoVega/fix-5286
Prevents label from taking up all the space for env autocomplete
2025-10-09 11:26:36 +01:00
Nick O'Leary e5ebf5029c
Merge pull request #5292 from GogoVega/fix-5289
Fix env autocomplete result if searchKey starts with `${`
2025-10-09 11:25:59 +01:00
Nick O'Leary 1813a5791d
Merge pull request #5290 from node-red/5283-fix-ui-lockup-for-typed-arrays
Fix UI lock-up when typed arrays are expanded in debug window
2025-10-09 11:24:43 +01:00
Nick O'Leary 42d53c1cc5
Merge pull request #5281 from olivierpelet/master
Fix config node resolution in packaged subflow within subflow
2025-10-09 11:05:12 +01:00
Nick O'Leary 11feee3294
Merge pull request #5278 from GogoVega/fix-5275
Fix undo node output changes inside a Subflow
2025-10-09 10:18:46 +01:00
Nick O'Leary 762631e813
Merge pull request #5277 from GogoVega/notify-plugin-added
Notify installed plugins from the Palette Manager
2025-10-09 10:12:39 +01:00
Nick O'Leary 75e6ba209c
Merge pull request #5266 from node-red/fix-monaco-uncaught-promise-canceled
Fix uncaught Monaco error
2025-10-09 10:09:45 +01:00
Nick O'Leary 17fe94d368
Merge pull request #5265 from node-red/add-url-types-to-server-side-fn
Add 'url' module to default server-side types in Monaco editor
2025-10-09 10:07:28 +01:00
Nick O'Leary 6ffe5700b7
Merge pull request #5263 from hardillb/catch-red-comms-subscribe-error
Catch errors from RED.comms.subscribe callback
2025-10-09 10:07:05 +01:00
Nick O'Leary 7ae2f03ef3
Merge pull request #5257 from node-red/fix-range-nodes-escapes
Fix rounding errors for range node when using float inputs and intege…
2025-10-09 10:05:54 +01:00
GogoVega ebf5ae0ef3
Prevents label from taking up all the space for env autocomplete 2025-10-08 15:27:07 +02:00
GogoVega 90d5776f79
Fix env autocomplete result if searchKey starts with `${` 2025-10-08 14:41:20 +02:00