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

bug in group-transformation (scale one side + rotate) [$115 awarded] #95

Closed
urs opened this issue Dec 6, 2011 · 23 comments
Closed

bug in group-transformation (scale one side + rotate) [$115 awarded] #95

urs opened this issue Dec 6, 2011 · 23 comments
Labels

Comments

@urs
Copy link

urs commented Dec 6, 2011

Hello!

Reproduction of the bug:

  1. open kitchensink (http://kangax.github.com/fabric.js/kitchensink/)
  2. add two rectangles
  3. select both rectangles
  4. scale one side (not both!) of the group
  5. then grab a corner-handle and rotate the scaled group
  6. deselect

the rectangles will jump around instead of remaining the scale and position the got in the group.

Can you fix that?

The $115 bounty on this issue has been claimed at Bountysource.

@kangax
Copy link
Member

kangax commented Jan 26, 2012

I can reproduce this too. Marking as bug.

@Maxmyd
Copy link

Maxmyd commented Mar 27, 2012

Hello,
Any news on this issue? Looks like it's still not fixed

@kangax
Copy link
Member

kangax commented Mar 30, 2012

I didn't have time to fix it yet.

@limitium
Copy link

limitium commented Jun 5, 2013

Do you plan to fix this bug?

@woutercommandeur
Copy link
Contributor

This problem is in _restoreObjectState, and even worse in the fact that fabric does not support skewing of objects at the moment. It becomes very clear when you add 2 rectangles, rotate one of them to 30 degrees or so. Then select both rectangles and scale one side. This wil effectively skew the rotated rectangle. Deselecting after scaling will make the rectangle resume it's original non-skewed form because there is currently no way to skew.

@gregtap
Copy link
Contributor

gregtap commented Jun 7, 2013

How can we bid on tickets ? 💵

@kangax
Copy link
Member

kangax commented Jun 7, 2013

@coulix Through bountysource

@woutercommandeur I've been planning to add support for vertical and horizontal skewing sometime soon. The actual canvas implementation is easy (via transform matrix) but then we need to detect proper bounding box (expanding it by the length of side opposite to the angle). Also need to support this in SVG output, which I didn't look into yet.

@woutercommandeur
Copy link
Contributor

I just added a pull request that fixes the jumping around, but not the skewing :)
How do I collect the bounty?

@frenck
Copy link

frenck commented Jun 10, 2013

+1 for this fix!

@woutercommandeur
Copy link
Contributor

The bounty for this is still rising, is the fix not good enough? (or should we create a feature request for skewing)

@kangax
Copy link
Member

kangax commented Jun 15, 2013

@woutercommandeur I wanted to keep it open till skewing is fixed. Not sure how easy it is to transfer bounties to another ticket. I also think you should get at least half of the existing bounty for fixing jumping issue (need to check bountysource on how we can make that happen)

@woutercommandeur
Copy link
Contributor

@kangax Ok, probably should have closed this as soon as it was fixed and make a new ticket. But if we can transfer bounty then that will work. I don't want all of this since people are putting money on skewing.

@kangax
Copy link
Member

kangax commented Jun 15, 2013

How about we just ask folks who put bounties (@travispaul @Kienz @coulix) if skewing is still an issue. If it's not, I'll happily close this one and we'll open another one.

@woutercommandeur
Copy link
Contributor

Skewing is an issue, and should be fixed, but was not part of the original bug, non-rotated objects in a group now behave correctly.

@kangax
Copy link
Member

kangax commented Jun 15, 2013

@woutercommandeur I'm not saying skewing is not an issue. I just want to know if those who put bounties expected it to be fixed too, since it was mentioned in the comments. Technically though, original bug doesn't mention it so it would be fair to close it.

@woutercommandeur
Copy link
Contributor

@kangax ok. If bounty can't be transfered, I could always put half of the bounty on the new issue for skewing.

@travispaul
Copy link
Contributor

Thanks @woutercommandeur,
+1 from me, I am ok with this, skewing was not in the original ticket and this is an improvement.

@kangax if I were to open a ticket and then put up a bounty, is it possible to specify that a unit test a company the fix, or should requesting a unit test be a separate issue/bounty? Just curious.

Thanks

@kangax
Copy link
Member

kangax commented Jun 15, 2013

Well, I try to always add unit tests when possible. But a lot of visual
behavior like dragging/rotating and things like border/corner offsets or
line widths, etc. are hard to unit test programmatically. In cases like
that, a visual/functional test is a nice addition, but not a requirement.

On Sat, Jun 15, 2013 at 6:25 PM, Travis Paul [email protected]:

Thanks @woutercommandeur https://github.com/woutercommandeur,
+1 from me, I am ok with this, skewing was not in the original ticket and
this is an improvement.

@kangax https://github.com/kangax if I were to open a ticket and then
put up a bounty, is it possible to specify that a unit test a company the
fix, or should requesting a unit test be a separate issue/bounty? Just
curious.

Thanks


Reply to this email directly or view it on GitHubhttps://github.com//issues/95#issuecomment-19499083
.

@gregtap
Copy link
Contributor

gregtap commented Jun 15, 2013

+1 as well

@Kienz
Copy link
Collaborator

Kienz commented Jun 16, 2013

@woutercommandeur I'm ok with this. Great work.
@kangax I think we can close this bug and open new one for skewing. Maybe someone will create bounties (woutercommandeur :-)).

@woutercommandeur
Copy link
Contributor

:)

@kangax
Copy link
Member

kangax commented Jun 16, 2013

Perfect, thanks again @woutercommandeur

@basarat
Copy link

basarat commented Mar 3, 2014

In case someone else has the same error : The group jumps around if we use this.canvas.setActiveGroup(group); and then click on some other group.

Fix : Use this.canvas.setActiveObject(group);

@kangax kangax changed the title bug in group-transformation (scale one side + rotate) bug in group-transformation (scale one side + rotate) [$115 awarded] Feb 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants