79092948

Date: 2024-10-16 07:47:26
Score: 1
Natty:
Report link

Version 6.0 up:

You can do this in simple way:


const polygon = new Polygon(fabricPoints, {
 fill: 'rgba(255, 0, 0, 0.5)',
 stroke: 'black',
 strokeWidth: 2,
 selectable: true,
 hasControls: true,
 hasBorders: true,
});

polygon.setBoundingBox(); //this will recalculate bounding box

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: TheSinOfGreed