mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Merge branch 'master' into master
This commit is contained in:
commit
28df587b27
47
konva.d.ts
vendored
47
konva.d.ts
vendored
@ -9,6 +9,49 @@ declare namespace Konva {
|
|||||||
e: { target: Konva.Shape; evt: Event; currentTarget: Konva.Node; cancelBubble: boolean }
|
e: { target: Konva.Shape; evt: Event; currentTarget: Konva.Node; cancelBubble: boolean }
|
||||||
) => void;
|
) => void;
|
||||||
|
|
||||||
|
enum KonvaNodeEvent {
|
||||||
|
mouseover = 'mouseover',
|
||||||
|
mouseout = 'mouseout',
|
||||||
|
mousemove = 'mousemove',
|
||||||
|
mouseleave = 'mouseleave',
|
||||||
|
mouseenter = 'mouseenter',
|
||||||
|
mousedown = 'mousedown',
|
||||||
|
mouseup = 'mouseup',
|
||||||
|
wheel = 'wheel',
|
||||||
|
contextmenu = 'contextmenu',
|
||||||
|
click = 'click',
|
||||||
|
dblclick = 'dblclick',
|
||||||
|
touchstart = 'touchstart',
|
||||||
|
touchmove = 'touchmove',
|
||||||
|
touchend = 'touchend',
|
||||||
|
tap = 'tap',
|
||||||
|
dbltap = 'dbltap',
|
||||||
|
dragstart = 'dragstart',
|
||||||
|
dragmove = 'dragmove',
|
||||||
|
dragend = 'dragend',
|
||||||
|
}
|
||||||
|
|
||||||
|
enum KonvaStageEvent {
|
||||||
|
contentMouseover = 'contentMouseover',
|
||||||
|
contentMousemove = 'contentMousemove',
|
||||||
|
contentMouseout = 'contentMouseout',
|
||||||
|
contentMousedown = 'contentMousedown',
|
||||||
|
contentMouseup = 'contentMouseup',
|
||||||
|
contentWheel = 'contentWheel',
|
||||||
|
contentContextmenu = 'contentContextmenu',
|
||||||
|
contentClick = 'contentClick',
|
||||||
|
contentDblclick = 'contentDblclick',
|
||||||
|
contentTouchstart = 'contentTouchstart',
|
||||||
|
contentTouchmove = 'contentTouchmove',
|
||||||
|
contentTouchend = 'contentTouchend',
|
||||||
|
contentTap = 'contentTap',
|
||||||
|
contentDblTap = 'contentDblTap',
|
||||||
|
}
|
||||||
|
|
||||||
|
type KonvaEvent = KonvaNodeEvent & KonvaStageEvent;
|
||||||
|
|
||||||
|
type KonvaEventString = KonvaEvent | string;
|
||||||
|
|
||||||
type globalCompositeOperationType =
|
type globalCompositeOperationType =
|
||||||
| ''
|
| ''
|
||||||
| 'source-over'
|
| 'source-over'
|
||||||
@ -303,7 +346,7 @@ declare namespace Konva {
|
|||||||
name(name: string): this;
|
name(name: string): this;
|
||||||
noise(): number;
|
noise(): number;
|
||||||
noise(noise: number): this;
|
noise(noise: number): this;
|
||||||
off(evtStr: string): this;
|
off(evtStr: KonvaEventString): this;
|
||||||
offset(): Vector2d;
|
offset(): Vector2d;
|
||||||
offset(offset: Vector2d): this;
|
offset(offset: Vector2d): this;
|
||||||
offsetX(): number;
|
offsetX(): number;
|
||||||
@ -311,7 +354,7 @@ declare namespace Konva {
|
|||||||
offsetY(): number;
|
offsetY(): number;
|
||||||
offsetY(offsetY: number): this;
|
offsetY(offsetY: number): this;
|
||||||
on<K extends keyof KonvaNodeEventMap>(evtStr: K, handler: (e: { target: Konva.Shape; evt: KonvaNodeEventMap[K]; currentTarget: Konva.Node; cancelBubble: boolean }) => void): this;
|
on<K extends keyof KonvaNodeEventMap>(evtStr: K, handler: (e: { target: Konva.Shape; evt: KonvaNodeEventMap[K]; currentTarget: Konva.Node; cancelBubble: boolean }) => void): this;
|
||||||
on(evtStr: string, handler: HandlerFunc): this;
|
on(evtStr: KonvaEventString, handler: HandlerFunc): this;
|
||||||
opacity(): number;
|
opacity(): number;
|
||||||
opacity(opacity: number): this;
|
opacity(opacity: number): this;
|
||||||
pixelSize(): number;
|
pixelSize(): number;
|
||||||
|
Loading…
Reference in New Issue
Block a user