mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
Merge branch 'master' of github.com:konvajs/konva
This commit is contained in:
commit
44d6d83b7f
@ -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 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).
|
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.
|
||||||
|
13
konva.d.ts
vendored
13
konva.d.ts
vendored
@ -5,13 +5,15 @@ declare namespace Konva {
|
|||||||
var isDragReady: () => boolean;
|
var isDragReady: () => boolean;
|
||||||
var DD: any;
|
var DD: any;
|
||||||
|
|
||||||
type HandlerFunc<E = Event> = (
|
export interface KonvaEventObject<E> {
|
||||||
e: {
|
|
||||||
target: Konva.Shape;
|
target: Konva.Shape;
|
||||||
evt: E;
|
evt: E;
|
||||||
currentTarget: Konva.Node;
|
currentTarget: Konva.Node;
|
||||||
cancelBubble: boolean;
|
cancelBubble: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type HandlerFunc<E = Event> = (
|
||||||
|
e: KonvaEventObject<E>
|
||||||
) => void;
|
) => void;
|
||||||
|
|
||||||
enum KonvaNodeEvent {
|
enum KonvaNodeEvent {
|
||||||
@ -364,12 +366,7 @@ declare namespace Konva {
|
|||||||
on<K extends keyof KonvaNodeEventMap>(
|
on<K extends keyof KonvaNodeEventMap>(
|
||||||
evtStr: K,
|
evtStr: K,
|
||||||
handler: (
|
handler: (
|
||||||
e: {
|
e: KonvaEventObject<KonvaNodeEventMap[K]>
|
||||||
target: Konva.Shape;
|
|
||||||
evt: KonvaNodeEventMap[K];
|
|
||||||
currentTarget: Konva.Node;
|
|
||||||
cancelBubble: boolean;
|
|
||||||
}
|
|
||||||
) => void
|
) => void
|
||||||
): this;
|
): this;
|
||||||
on(evtStr: KonvaEventString, handler: HandlerFunc): this;
|
on(evtStr: KonvaEventString, handler: HandlerFunc): this;
|
||||||
|
Loading…
Reference in New Issue
Block a user