Skip to content

Commit

Permalink
fix: fix guides zoom #83
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Jul 23, 2023
1 parent b2f0e88 commit 207f218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-guides/src/react-guides/Guides.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export default class Guides extends React.PureComponent<GuidesProps, GuidesState
const pos = this.movePos(e);
let guides = this.state.guides;
const { onChangeGuides, displayDragPos, digit, lockGuides, guidesOffset } = this.props;
const zoom = this._zoom;
const zoom = this._guidesZoom;
const guidePos = parseFloat((pos / zoom!).toFixed(digit || 0));
const baseScrollPos = this.scrollPos - (guidesOffset || 0);

Expand Down Expand Up @@ -499,7 +499,7 @@ export default class Guides extends React.PureComponent<GuidesProps, GuidesState
digit,
} = props;
const guidesOffset = props.guidesOffset || 0;
const zoom = this._zoom;
const zoom = this._guidesZoom;
const dragPosFormat = props.dragPosFormat || (v => v);
const isHorizontal = type === "horizontal";
const matrixPos = calculateMatrixDist(datas.matrix, [distX, distY]);
Expand Down

0 comments on commit 207f218

Please sign in to comment.