-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
activeGroup removeObject (shiftKey) did not work if perPixelTargetFind = true #532
Labels
Comments
@Kienz is this still happening? |
Actually i cannot deselect in any grouped object. with shift. not with perPixelTarget, not normal. |
9e1a93d#diff-9dc132ed9a0787568f773999ba577e2bR813 i know pointing finger is easy, it looks like is this. |
No restoring that line those not change situation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the following jsfiddle you can see the behavior of activeGroup with
perPixelTargetFind = true
(left canvas) and activeGroup withperPixelTargetFind = false
(right canvas).Select all objects and try to deselect one of the group objects with shiftKey. On the left canvas it doesn't work.
http://jsfiddle.net/Kienz/62AXX/
The problem is that absolute pointer coordinates are used for target with relative coordinates (group object). I tried to normalizePointer (_normalizePointer) => this worked only for objects with positive relative left/top parameters.
The other thing i tried is to use whole group object for check if target is transparent:
var isTransparent = this._isTargetTransparent(activeGroup && this.containsPoint(e, activeGroup) ? possibleTargets[j].group : possibleTargets[j], pointer);
https://github.com/kangax/fabric.js/blob/master/src/canvas.class.js#L749
This works but maybe there is some performance problem for large groups (all objects have to be renderd on cacheContext).
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: