mirror of
https://github.com/konvajs/konva.git
synced 2025-12-26 22:55:44 +08:00
add "clicked shape" to the contextmenu event
The "contentContextmenu" event now return in the target property the clicked shape
This commit is contained in:
@@ -612,7 +612,9 @@
|
||||
}
|
||||
},
|
||||
_contextmenu: function(evt) {
|
||||
this._fire(CONTENT_CONTEXTMENU, { evt: evt });
|
||||
this._setPointerPosition(evt);
|
||||
var shape = this.getIntersection(this.getPointerPosition());
|
||||
this._fire(CONTENT_CONTEXTMENU, { evt: evt, target: shape });
|
||||
},
|
||||
_touchstart: function(evt) {
|
||||
this._setPointerPosition(evt);
|
||||
|
||||
Reference in New Issue
Block a user