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

Bag flipX #6269

Closed
i-prikot opened this issue Apr 12, 2020 · 3 comments · Fixed by #6278
Closed

Bag flipX #6269

i-prikot opened this issue Apr 12, 2020 · 3 comments · Fixed by #6278
Labels

Comments

@i-prikot
Copy link

Version

4.0.0-beta.10

Test Case

https://codepen.io/i-prikot/pen/pojJbMm

Information about environment

Nodejs or browser?
v10.15.1
Which browsers?
Google Chrome

Steps to reproduce

FlipX object breaks controls

Expected Behavior

Flip horizontally

Actual Behavior

Rotates vertically and breaks controls

@asturur asturur added the bug label Apr 12, 2020
@i-prikot
Copy link
Author

i-prikot commented Apr 14, 2020

calcOCoords: function() {
      var rotateMatrix = this._calcRotateMatrix(),
        translateMatrix = this._calcTranslateMatrix(),
        startMatrix = multiplyMatrices(translateMatrix, rotateMatrix),
        vpt = this.getViewportTransform(),
        mMatrix = multiplyMatrices(vpt, startMatrix),
        dim = this._calculateCurrentDimensions(),
        options = util.qrDecompose(mMatrix),
        coords = {};

      options.scaleX = 1;
      options.scaleY = 1;

      var finalMatrix = util.composeMatrix(options);

      this.forEachControl(function(control, key, fabricObject) {
        coords[key] = control.positionHandler(dim, finalMatrix, fabricObject);
      });

      return coords;
}

@asturur
Copy link
Member

asturur commented Apr 14, 2020

You should compare with the latest unpublished beta. The problem is still there, but that is the code we want to look at.
I may know how the bug was introduced, i just need time to look for a fix.

@i-prikot
Copy link
Author

i-prikot commented Apr 15, 2020

You should compare with the latest unpublished beta. The problem is still there, but that is the code we want to look at.
I may know how the bug was introduced, i just need time to look for a fix.

Sorry. I don't want to seem intrusive. The code above helped me. Thank you!

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.

2 participants