mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Prefer arrow functions (#2344)
This commit is contained in:
parent
e05acd6fd9
commit
a20f3240fd
19 changed files with 304 additions and 336 deletions
|
@ -10,11 +10,11 @@ import {
|
|||
export const normalizeScroll = (pos: number) =>
|
||||
Math.floor(pos) as FlooredNumber;
|
||||
|
||||
function isOutsideViewPort(
|
||||
const isOutsideViewPort = (
|
||||
appState: AppState,
|
||||
canvas: HTMLCanvasElement | null,
|
||||
cords: Array<number>,
|
||||
) {
|
||||
) => {
|
||||
const [x1, y1, x2, y2] = cords;
|
||||
const { x: viewportX1, y: viewportY1 } = sceneCoordsToViewportCoords(
|
||||
{ sceneX: x1, sceneY: y1 },
|
||||
|
@ -28,7 +28,7 @@ function isOutsideViewPort(
|
|||
viewportX2 - viewportX1 > appState.width ||
|
||||
viewportY2 - viewportY1 > appState.height
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export const centerScrollOn = ({
|
||||
scenePoint,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue