mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
refactor: Replace { x: number, y: number } type declarations with Point type
- Updated type declarations written as { x: number, y: number } to use the Point type as per requirements. - Explicit names were used for variables by destructuring previously used object types. - For example, scenePointer.x, scenePointer.y are now destructured as scenePointerX and scenePointerY. - When a Point type was required as an argument, the `pointFrom` helper function was used to convert and pass the value.
This commit is contained in:
parent
85cb973936
commit
899c652147
21 changed files with 210 additions and 188 deletions
|
@ -422,7 +422,7 @@ export default function ExampleApp({
|
|||
if (!excalidrawAPI) {
|
||||
return false;
|
||||
}
|
||||
const { x, y } = viewportCoordsToSceneCoords(
|
||||
const [x, y] = viewportCoordsToSceneCoords(
|
||||
{
|
||||
clientX: event.clientX - pointerDownState.hitElementOffsets.x,
|
||||
clientY: event.clientY - pointerDownState.hitElementOffsets.y,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue