Skip to content

Commit

Permalink
fix: fix useAccuratePosition for group
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Dec 10, 2022
1 parent c05ba1f commit e1b3ae7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-moveable/src/MoveableManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default class MoveableManager<T = {}>
const isVisible = this.controlBox || this.props.firstRenderState || this.props.persistData;
const translate = [left - parentLeft, top - parentTop];

if (props.useAccuratePosition) {
if (!groupable && props.useAccuratePosition) {
translate[0] += offsetDelta[0];
translate[1] += offsetDelta[1];
}
Expand Down
1 change: 1 addition & 0 deletions packages/react-moveable/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ export interface DefaultOptions {
/**
* Whether to accurately show the position of a movable control box
* Because getBoundingClientRect is used, css zoom, transform: rotate between container and rootContainer cannot be used.
* group is not supported.
* @default false
*/
useAccuratePosition?: boolean;
Expand Down

0 comments on commit e1b3ae7

Please sign in to comment.