Open niketaOptimumnbrew opened 7 months ago
ok that is weird, could be interaction with scale flipping, i don't remember seeing that before. Does it happen also in v6.x?
Try to change the value of lockScalingFlip
between either true and false and see if it avoids that?
@asturur I have tried lockScalingFlip with true and false value , but it's not working.
function changeWidth(eventData, transform, x, y) { var target = transform.target, localPoint = getLocalPoint(transform, transform.originX, transform.originY, x, y), strokePadding = target.strokeWidth / (target.strokeUniform ? target.scaleX : 1), multiplier = isTransformCentered(transform) ? 2 : 1, oldWidth = target.width, //before //newWidth = Math.abs(localPoint.x * multiplier / target.scaleX) - strokePadding; //after newWidth = localPoint.x * multiplier / target.scaleX - strokePadding; target.set('width', Math.max(newWidth, 0)); return oldWidth !== newWidth; }
I see the localPoint.x becomes negative when dragging the mouse from right to left. Math.abs makes it positive, and obj increase the width
See example: https://jsfiddle.net/mhieupham/wgser7xv/5/
CheckList
Version
5.3.0
In What environments are you experiencing the problem?
Firefox, Chrome
Node Version (if applicable)
14.20.0
Link To Reproduction
http://fabricjs.com/kitchensink
Steps To Reproduce
Expected Behavior
Actual Behavior
Error Message & Stack Trace