Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Pan/scroll/translate the BPMN diagram with the mouse wheel #168

Open
Tracked by #171
tbouffard opened this issue Oct 30, 2020 · 0 comments
Open
Tracked by #171

[FEAT] Pan/scroll/translate the BPMN diagram with the mouse wheel #168

tbouffard opened this issue Oct 30, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@tbouffard
Copy link
Member

tbouffard commented Oct 30, 2020

[UPDATE 2023-11-12] Originally named https://github.com/process-analytics/bpmn-visualization-js/issues/845

Is your feature request related to a problem? Please describe.

Allow to scroll the diagram with the mouse wheel. This is particularly useful when the BPMN container has a fixed size and has no scrollbar.
As for other mouse navigation controls, this feature can be activated by configuration.

Describe the solution you'd like

Something similar to the POC demonstrated in process-analytics/bpmn-visualization-js#555

  • mouse wheel only: move the diagram vertically
  • SHIFT + mouse wheel: move the diagram horizontally

These are the regular way to control scrollbars in web browsers.
Notice that when the BPMN container has scrollbars, this should be delegated to the browser because it already handles it.

Additional context

Note: We may need to measure rendering performance of this feature as we do for process-analytics/bpmn-visualization-js#839.

It is already possible to use the scrollbars to scroll the diagram (see process-analytics/bpmn-visualization-js#735 and process-analytics/bpmn-visualization-examples#216).

The implementation should

Notice that the usage of throttle/debounce won't be necessary if we implement something like process-analytics/bpmn-visualization-js#2199

About the event management, the zoom support in bpmn-visualization could be probably improved by following the suggestion stated by Chromium (the following has been seen in the Brave browser). We may directly implement it here:

plugins-support.js:20 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event.
Consider marking event handler as 'passive' to make the page more responsive.
See https://www.chromestatus.com/feature/5745543795965952
(anonymous) @ build.js:9808
addMouseWheelListener @ build.js:10219
registerMouseWheelZoomListeners @ bpmn-visualization.esm.js:1166
configureNavigationSupport @ bpmn-visualization.esm.js:2961
configure @ bpmn-visualization.esm.js:2937
BpmnVisualization @ bpmn-visualization.esm.js:4817
BpmnVisualization @ plugins-support.js:20
(anonymous) @ overlays.ts:30
plugins-support.js:20 [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event.
Consider marking event handler as 'passive' to make the page more responsive.
See https://www.chromestatus.com/feature/5745543795965952
@tbouffard tbouffard added the enhancement New feature or request label Oct 30, 2020
@tbouffard tbouffard transferred this issue from process-analytics/bpmn-visualization-js Nov 14, 2023
@tbouffard tbouffard changed the title [FEAT] Pan/translate the BPMN diagram with the mouse wheel [FEAT] Pan/scroll/translate the BPMN diagram with the mouse wheel Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant