Skip to content

Commit

Permalink
fix: fix that dragStart method cannot fire #718
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Aug 11, 2022
1 parent dd4cfe1 commit 5ea9fc3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions packages/moveable/src/consts.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { MOVEABLE_PROPS_MAP } from "react-compat-moveable";
import { MOVEABLE_PROPS, MOVEABLE_METHODS, MOVEABLE_EVENTS } from "react-moveable";
import {
MOVEABLE_PROPS_MAP,
MOVEABLE_PROPS,
MOVEABLE_METHODS,
MOVEABLE_EVENTS,
} from "react-moveable";

export const PROPERTIES: string[] = MOVEABLE_PROPS;
export const METHODS: string[] = MOVEABLE_METHODS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,8 @@ export default {
},
};
},
unset(moveable: any) {
unset(moveable: MoveableManagerInterface<any, Record<string, any>>) {
moveable.state.gestos.draggable = null;
moveable.state.dragInfo = null;
},
};
Expand Down
3 changes: 3 additions & 0 deletions packages/react-moveable/src/react-moveable/ables/Resizable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,9 @@ export default {
},
};
},
unset(moveable: MoveableManagerInterface<any, {}>) {
moveable.state.gestos.resizable = null;
},
};

/**
Expand Down

0 comments on commit 5ea9fc3

Please sign in to comment.