-
Notifications
You must be signed in to change notification settings - Fork 24
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
The altKeyZoom attribute doesn't work as described #121
Comments
I just tried to replace the altKeyZoom attribute with modKeyZoom('Alt'), the latter one works! So I suspect the problem might arise from line 212 in diagram.js: |
Hey, sorry I haven’t had a chance to look at this. I think it is probably a documentation bug. It is definitely delicate and I am sure there is a better system, but there is usually a way to get it working, so I’ve never cleaned it up. In situations like this it’s probably best to look for an example that does work and then see what it did. Let’s see if we can document this better, and deprecate one of the APIs if the name is misleading. |
Thanks for the reply! And yes, I think the documentation could be further improved because the 'altKeyZoom' attribute could be found by entering into the search bar but not 'modKeyZoom'. However, I don't quite understand why make them two different attributes while they should serve the same function (zoom with Alt key pressed). ('altKeyZoom' is used in the brushing and filtering demo, and 'modKeyZoom' is used in the drag-drop composition demo.) |
IIRC what happened here is that we tried to add new functionality in a backward-compatible way, but we slipped up. Originally it was a boolean We probably tried to upgrade boolean into So The key-matching logic is here: Lines 57 to 66 in 1466cef
Please let me know if using the string |
I just tried AltKeyZoom with 'Alt', and it worked! So it wasn't successfully set to Boolean and still carries the same function as modKeyZoom. |
As stated in the documentation, when altKeyZoom is set to be true, zooming should only be enabled as the alt key is pressed. We've tried with multiple computers, and wouldn't be able to zoom or move the graph when the alt key is pressed. If I set altKeyZoom to false, the zooming and graph moving functions are enabled but they happen simultaneously with the brushing and filtering function, which causes inconvenience.
The text was updated successfully, but these errors were encountered: