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

Cannot move active group when perPixelTargetFind is true #3107

Closed
AdamMerrifield opened this issue Jul 15, 2016 · 1 comment · Fixed by #3109
Closed

Cannot move active group when perPixelTargetFind is true #3107

AdamMerrifield opened this issue Jul 15, 2016 · 1 comment · Fixed by #3109

Comments

@AdamMerrifield
Copy link
Contributor

Version

1.6.2

Test Case

http://codepen.io/merrifield69/full/VjyXxx/

Steps to reproduce

Set perPixelTargetFind: true on the fabric.Canvas
Create an active group of 2 or more objects.
Hover your mouse over the active group (notice the cursor).
Try to move the active group.

Expected Behavior

The group should actually move when trying to move it.

Actual Behavior

Does not move the group, just starts a new selection.

Possible Solution

I believe this is occurring because the transform on the group is being run twice.

During canvas.findTarget we send canvas._checkTarget the activeGroup

After which canvas._checkTarget sends the activeGroup to canvas.isTargetTransparent

Inside of canvas.isTargetTransparent we set the transform and then render the object, but render of a group sets the transform itself as well.

I believe that we would need to add the second noTransform parameter to the group's render method

If this is the correct assumption I should be able to submit a pull request for this problem. Just want to make sure I'm not overlooking something.

@asturur
Copy link
Member

asturur commented Jul 16, 2016

image

this is the situation of transparency check with an activeGroup. i fixed short time ago. we definitely need more visual tests of various kind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants