fix(pointer-events): fix possible undefined stage error

Sometimes a shape may not have a stage associated with it? I was  hitting this in our app. I also cleaned up the event types a bit and added the pointer methods to Stage to be consistent with the other types
This commit is contained in:
Jason Quense
2019-05-30 17:11:31 -04:00
parent d24f6156c3
commit 4dd2a60b55
4 changed files with 27 additions and 15 deletions

View File

@@ -46,6 +46,8 @@ declare namespace Konva {
EventType
>;
export type KonvaPointerEvent = import('./PointerEvents').KonvaPointerEvent;
export type KonvaEventListener<
This,
EventType