Rohan210 Rohan210 - 2 months ago 38x
Javascript Question

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

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 (horizontally or vertically).
I only want the corner points, not the ones on sides.

Is it that possible with fabric.js?


You can use object.lockUniScaling = true.
Also, you can customize your corners: