taqimustafa / fabricjs-polygon

Draw polygon using mouse in fabricjs
40 stars 11 forks source link

Is it possible to create polygon holding the point (circle) #5

Open chandandas opened 6 years ago

chandandas commented 6 years ago

Hi,

Thanks for this code. However i want to create polygon using pre-defined points. Then i want to hold a particular point and then begin dragging it and then only the ploygon should be created.

Is it possible?

taqimustafa commented 6 years ago

@chandandas Yes, it might be possible if we add circles on each point of polygon, and then when ever that circle is dragged, update the polygon array. It will be similar to creating Fabricjs controls, but instead of 4 on the corners, it will be on each polygon corner

chandandas commented 6 years ago

Ok. Thanks. Will try though not that great in fabricjs!