I am using PolygonDrawingtool. Ive read on the documentation that it won’t start in a mode-less fashion when the user’s mouse-down is on an existing Part. I am creating a project where i have a blueprint (image) and the user will highlight the areas on blueprint by using polygon drawing tool, it is easy to trace a drawing on the blueprint by this tool. Is there a way that the user can start the polygon on mouse down on the blueprint (image)?
Sure, just replace the last two statements of PolygonDrawingTool.canStart:
// can't start when mouse-down on an existing Part
var obj = diagram.findObjectAt(diagram.firstInput.documentPoint, null, null);
return (obj === null);
With:
return true;