Skip to content

Commit

Permalink
fix: fix rotate position #710
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Aug 1, 2022
1 parent ffa0c18 commit d269d1f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ function setRotateStartInfo(
datas: IObject<any>, clientX: number, clientY: number,
rect: MoveableClientRect,
) {
const groupable = moveable.props.groupable;
const state = moveable.state;
const n = state.is3d ? 4 : 3;
const origin = datas.origin;
const nextOrigin = calculatePosition(
moveable.state.rootMatrix,
minus([origin[0], origin[1]], [state.left, state.top]),
// TO-DO #710
minus([origin[0], origin[1]], groupable ? [0, 0] : [state.left, state.top]),
n,
);
const startAbsoluteOrigin = plus([rect.left, rect.top], nextOrigin);
Expand Down

0 comments on commit d269d1f

Please sign in to comment.