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

activeGroup removeObject (shiftKey) did not work if perPixelTargetFind = true #532

Closed
Kienz opened this issue Apr 3, 2013 · 6 comments · Fixed by #2894
Closed

activeGroup removeObject (shiftKey) did not work if perPixelTargetFind = true #532

Kienz opened this issue Apr 3, 2013 · 6 comments · Fixed by #2894
Labels

Comments

@Kienz
Copy link
Collaborator

Kienz commented Apr 3, 2013

In the following jsfiddle you can see the behavior of activeGroup with perPixelTargetFind = true (left canvas) and activeGroup with perPixelTargetFind = 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.

@kangax
Copy link
Member

kangax commented Nov 8, 2014

@Kienz is this still happening?

@asturur
Copy link
Member

asturur commented Apr 3, 2015

Actually i cannot deselect in any grouped object. with shift. not with perPixelTarget, not normal.

@asturur
Copy link
Member

asturur commented Apr 3, 2015

@kangax @Kienz i just tested, i cannot deselect any selection created active group using shift key.
I really do not know if this is a new issue

@kangax
Copy link
Member

kangax commented Apr 3, 2015

@asturur @Kienz looks like a regression (it worked before)

@asturur
Copy link
Member

asturur commented Apr 3, 2015

9e1a93d#diff-9dc132ed9a0787568f773999ba577e2bR813

i know pointing finger is easy, it looks like is this.
i cannot make test now.

@asturur
Copy link
Member

asturur commented Apr 4, 2015

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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants