javascript - KineticJS: Get the mouse button, x and y from the 'click' event on a Circle -
using kineticjs, created circle: using next line:
var circle = new kinetic.circle({...});
then, started listening 'click' event way:
circle.on("click", function(evt) { // hope mouse button, x , y here... });
using evt object above, hope mouse button used click, , x , y of click location. inspected evt object, , not find of these.
i did target node, , event type 'evt' object though.
am missing anything? may argument click handler?
i post sscce if info not enough.
any response appreciated!
in latest kineticjs version (5.1.0), can position accessing evt.evt.clientx
, evt.evt.clienty
.
regarding detection of mouse button clicked, take @ this approach jquery cross-browser back upwards
javascript click mouse kineticjs
No comments:
Post a Comment