diff --git a/src/Node.ts b/src/Node.ts index a26ce37bb..98a2f1eeb 100644 --- a/src/Node.ts +++ b/src/Node.ts @@ -116,19 +116,19 @@ type NodeEventMap = GlobalEventHandlersEventMap & { [index: string]: any; }; -export interface KonvaEventObject { +export interface KonvaEventObject { type: string; target: Shape | Stage; evt: EventType; pointerId: number; - currentTarget: Node; + currentTarget: This; cancelBubble: boolean; child?: Node; } export type KonvaEventListener = ( this: This, - ev: KonvaEventObject + ev: KonvaEventObject ) => void; /** @@ -814,7 +814,7 @@ export abstract class Node { var targets = evt.target.findAncestors(selector, true, stopNode); for (var i = 0; i < targets.length; i++) { evt = Util.cloneObject(evt); - evt.currentTarget = targets[i]; + evt.currentTarget = targets[i] as any; handler.call(targets[i], evt as any); } });