Skip to content

Commit

Permalink
fix: fix group gestos for strict mode #656
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed May 6, 2022
1 parent aec29c6 commit 311c931
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/react-moveable/src/react-moveable/MoveableGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,17 @@ class MoveableGroup extends MoveableManager<GroupableProps> {
unset(this, "controlGesto");
state.target = null;
}

if (!state.target) {
state.target = this.areaElement;

this.controlBox.getElement().style.display = "block";
this.targetGesto = getTargetAbleGesto(this, nextTarget, "Group");
this.controlGesto = getAbleGesto(this, this.controlBox.getElement(), "controlAbles", "GroupControl");
}
if (state.target) {
if (!this.targetGesto) {
this.targetGesto = getTargetAbleGesto(this, nextTarget, "Group");
}
if (!this.controlGesto) {
this.controlGesto = getAbleGesto(this, this.controlBox.getElement(), "controlAbles", "GroupControl");
}
}
const isContainerChanged = !equals(state.container, props.container);

Expand Down

0 comments on commit 311c931

Please sign in to comment.