From 4389b156bf643c26ad79379bfe4d28c022e8147e Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Fri, 9 Oct 2020 11:11:29 +0800 Subject: [PATCH] fix miss type of dragBoundFunc --- src/Node.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Node.ts b/src/Node.ts index b6a13805..82653699 100644 --- a/src/Node.ts +++ b/src/Node.ts @@ -118,7 +118,7 @@ export interface NodeConfig { offsetY?: number; draggable?: boolean; dragDistance?: number; - dragBoundFunc?: (pos: Vector2d) => Vector2d; + dragBoundFunc?: (this: Node, pos: Vector2d) => Vector2d; preventDefault?: boolean; globalCompositeOperation?: globalCompositeOperationType; filters?: Array; @@ -2533,7 +2533,7 @@ export abstract class Node { threshold: GetSet; value: GetSet; - dragBoundFunc: GetSet<(pos: Vector2d) => Vector2d, this>; + dragBoundFunc: GetSet<(this: Node, pos: Vector2d) => Vector2d, this>; draggable: GetSet; dragDistance: GetSet; embossBlend: GetSet;