-
Notifications
You must be signed in to change notification settings - Fork 33
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] Allow to zoom the BPMN diagram with mouse wheel #734
Conversation
650e3b2
to
aa65a4d
Compare
2ee8cb4
to
c41cb8f
Compare
Mac OSFirefox
=> Browser Zoom, even the button is zoom/dezoom (cursor position on task) Safari
|
# Conflicts: # test/e2e/bpmn.navigation.test.ts
src/component/BpmnVisualization.ts
Outdated
@@ -31,7 +31,8 @@ export default class BpmnVisualization { | |||
} | |||
// Instantiate and configure Graph | |||
const configurator = new MxGraphConfigurator(this.container); | |||
this.graph = configurator.configure(options); | |||
this.graph = configurator.configure(); | |||
configurator.configureMouseNavigationSupport(options); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't put this in configurator.configure()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I missed to reintegrate it after refactoring, the configureMouseNavigationSupport
method was previously hold in BpmnVisualization
I will put everything within the MxGraphConfigurator.configure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with 8346db6
const deltaX = zoom === 'zoom in' ? -100 : 100; | ||
// simulate mouse+ctrl zoom | ||
await page.mouse.move(viewportCenterX, viewportCenterY); | ||
await page.keyboard.down('Control'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to check it but it seems it is working well on Mac in our GitHub 'checks' :)
perhaps puppeteer handles that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
puppeteer is running Chromium. Let's review this in #773
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add zoom support with CTRL + mouse wheel for Linux and Windows.
As discussed with @csouchet, macOS support will be managed with #773.
closes #730