mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
added support for evt.shape so any event handler can have access to the shape that was interacted with
This commit is contained in:
@@ -583,6 +583,9 @@ Kinetic.Node.prototype = {
|
||||
* @param {Event} evt
|
||||
*/
|
||||
_handleEvents: function(eventType, evt) {
|
||||
if (this.className === 'Shape') {
|
||||
evt.shape = this;
|
||||
}
|
||||
var stage = this.getStage();
|
||||
this._handleEvent(this, stage.mouseoverShape, stage.mouseoutShape, eventType, evt);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user