How can I disable scaling points of canvas elements using fabric.js?

前端 未结 5 1749
臣服心动
臣服心动 2021-02-12 11:17

By default fabric.js elements come with 8 points to scale any objects. But the app I\'m working specifically requires that stretching should not be allowed on a single axis (hor

5条回答
  •  既然无缘
    2021-02-12 12:15

    You can use object.lockUniScaling = true.
    Also, you can customize your corners: http://fabricjs.com/customization

提交回复
热议问题