-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi Amit. I'd like to give user the ability to mark an object in an image, ideally by double-clicking at its location, which should then draw a circle around it. I've added this event handler to the API after line 250 of webfits-canvas.js:
this.canvas.ondblclick = function(e) {
var ctx = _this.canvas.getContext('2d');
ctx.beginPath();
ctx.arc(_this.xMouseDown, _this.yMouseDown, 80, 0, 2*Math.PI, true);
ctx.lineWidth=2;
ctx.strokeStyle='#FF0000';
ctx.stroke();
ctx.closePath();
return _this.draw();
};
I verified that the double-click event triggers this function, but I don't see any effect on the canvas. I'm aware that's more an issue of my limited canvas knowledge, but if you have an idea to make this work, it might be useful for other webfits applications, too.
Metadata
Metadata
Assignees
Labels
No labels