I\'m trying to place points (made via fabric.Circle
) on the corners of a fabric.Polygon
. The polygon may be moved, scaled or rotated by the user. H
The above code was working and saving to database properly, but still the offset persisted in the points while I enlarged and moved. So, I decided to set the width and height along with setting the points.
var width = self.polygon.width;
var height = polygon.height;
var scaleX = polygon.scaleX;
var scaleY = polygon.scaleY;
polygon.set({
width: width * scaleX,
height: height * scaleY,
scaleX: 1,
scaleY: 1
});