add "clicked shape" to the contextmenu event

The "contentContextmenu" event now return in the target property the clicked shape
This commit is contained in:
Namalee
2018-03-13 16:15:17 +01:00
committed by GitHub
parent 0730bb1da8
commit da07d63d7d

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