-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Allow multiple keys to enable multiple click selection #4184
Conversation
src/canvas.class.js
Outdated
if (e[selectionKey]){ | ||
selectionKeyPressed = true; | ||
} | ||
}); |
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.
anyway this could be done with this.selectionKeys.some(function(key) { return e[selectionKey]; }) ? is still ES5 and i think has the same performance of forEach.
The problem of this change is that it breaks the api, again. |
I'll push an update soon that allows for backwards compatibility. |
yeah let me also think about it. i m not sure i want to push it in. I need to recap all the key combination and figure out if setting this for more keys can cause problems. I m not a fan of too many features |
Sure, thanks for considering ✌️ |
I m going to merge this, i need to clean it a bit, but talking with some people we decided that this feature is indeed requested by users because of the differences on how selection works in different software/OS. so... thanks! |
Changed selectionKey to an array in order to allow multiple keys to enable multi click selection. I thought this would be useful since, in my application that uses fabric.js, I would like to make it so that holding either shift or ctrl will enable multi selection. This is consistent with the behavior in other editors like Google Slides.