fabricjs / fabric.js

Javascript Canvas Library, SVG-to-Canvas (& canvas-to-SVG) Parser
http://fabricjs.com
Other
28.82k stars 3.5k forks source link

fix(changeWidth): support number transform.originX/Y #9909

Closed jiayihu closed 3 months ago

jiayihu commented 3 months ago

Since changeWidth is exported and reusable, it should support number transform.originX/Y instead of checking against string origins. While fabric's built-in _setupCurrentTransform use canvas._getOriginFromCorner for the origin values and it assigns string values, originX/Y can be a number as well.

codesandbox[bot] commented 3 months ago

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders
Open Preview

asturur commented 3 months ago

Seems good to me

asturur commented 3 months ago

added changelog