Merge pull request #359 from Namalee/Namalee-contextmenu-add-target

add "clicked shape" to the contextmenu event
This commit is contained in:
Anton Lavrenov
2018-03-16 10:43:44 +07:00
committed by GitHub

View File

@@ -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);