mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com> Co-authored-by: David Luzar <luzar.david@gmail.com> Co-authored-by: thxnder <tswwe@qq.com>
This commit is contained in:
parent
ca89d47d4c
commit
e4edda4555
2 changed files with 9 additions and 28 deletions
|
@ -244,8 +244,8 @@ export const sceneCoordsToViewportCoords = (
|
|||
scrollY: number;
|
||||
},
|
||||
) => {
|
||||
const x = (sceneX + scrollX + offsetLeft) * zoom.value + zoom.translation.x;
|
||||
const y = (sceneY + scrollY + offsetTop) * zoom.value + zoom.translation.y;
|
||||
const x = (sceneX + scrollX) * zoom.value + zoom.translation.x + offsetLeft;
|
||||
const y = (sceneY + scrollY) * zoom.value + zoom.translation.y + offsetTop;
|
||||
return { x, y };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue