[Solved] how to display size on shape after scaled using fabric js?

function updateMeasures(evt) { var obj = evt.target; if (obj.type != ‘group’) { return; } var width = obj.getWidth(); var height = obj.getWidth(); obj._objects[1].text = width.toFixed(2) + ‘px’; obj._objects[1].scaleX= 1 / obj.scaleX; obj._objects[1].scaleY= 1 / obj.scaleY; obj._objects[2].text = height.toFixed(2) + ‘px’; obj._objects[2].scaleX= 1 / obj.scaleY; obj._objects[2].scaleY= 1 / obj.scaleX; } canvas = new fabric.Canvas(‘canvas’); var rect … Read more