diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index d1c2c109..588c58bd 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -4,4 +4,4 @@ Please make sure to check current open and closed issues to see if your question If you have just a question (not a bug or a feature request) it is better to ask it in [Stackoverflow](http://stackoverflow.com/questions/tagged/konvajs). If you have a bug, please, try to create a reproducible example with jsfiddle (or any similar service). -You can use [this JSBIN](http://jsbin.com/xinabi/edit?html,js,output) as a template. +You can use [this JSBIN](https://jsbin.com/tekehizuta/1/edit?html,js,output) as a template. diff --git a/konva.d.ts b/konva.d.ts index dfd68e4c..d0f17a56 100644 --- a/konva.d.ts +++ b/konva.d.ts @@ -5,13 +5,15 @@ declare namespace Konva { var isDragReady: () => boolean; var DD: any; + export interface KonvaEventObject { + target: Konva.Shape; + evt: E; + currentTarget: Konva.Node; + cancelBubble: boolean; + } + type HandlerFunc = ( - e: { - target: Konva.Shape; - evt: E; - currentTarget: Konva.Node; - cancelBubble: boolean; - } + e: KonvaEventObject ) => void; enum KonvaNodeEvent { @@ -364,12 +366,7 @@ declare namespace Konva { on( evtStr: K, handler: ( - e: { - target: Konva.Shape; - evt: KonvaNodeEventMap[K]; - currentTarget: Konva.Node; - cancelBubble: boolean; - } + e: KonvaEventObject ) => void ): this; on(evtStr: KonvaEventString, handler: HandlerFunc): this;