This commit is contained in:
Ryan Di
2025-05-09 16:00:49 +10:00
parent 5dded6112c
commit ffbd4a5dc8
3 changed files with 24 additions and 24 deletions

View File

@@ -464,6 +464,12 @@ import { isMaybeMermaidDefinition } from "../mermaid";
import { LassoTrail } from "../lasso";
import {
constrainScrollState,
calculateConstrainedScrollCenter,
areCanvasTranslatesClose,
} from "../scene/scrollConstraints";
import { activeConfirmDialogAtom } from "./ActiveConfirmDialog";
import BraveMeasureTextError from "./BraveMeasureTextError";
import { ContextMenu, CONTEXT_MENU_SEPARATOR } from "./ContextMenu";
@@ -528,11 +534,6 @@ import type {
} from "../types";
import type { RoughCanvas } from "roughjs/bin/canvas";
import type { Action, ActionResult } from "../actions/types";
import {
constrainScrollState,
calculateConstrainedScrollCenter,
areCanvasTranslatesClose,
} from "../scene/scrollConstraints";
const AppContext = React.createContext<AppClassProperties>(null!);
const AppPropsContext = React.createContext<AppProps>(null!);

View File

@@ -1,10 +1,12 @@
import { isShallowEqual } from "@excalidraw/common";
import {
import { getNormalizedZoom } from "./normalize";
import type {
AnimateTranslateCanvasValues,
AppState,
ScrollConstraints,
} from "../types";
import { getNormalizedZoom } from "./normalize";
/**
* Calculates the scroll center coordinates and the optimal zoom level to fit the constrained scrollable area within the viewport.