fix: object snapping not working (#8381)

This commit is contained in:
David Luzar 2024-08-15 18:48:25 +02:00 committed by GitHub
parent 3cfcc7b489
commit fb4bb29aa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 53 additions and 46 deletions

View file

@ -28,6 +28,7 @@ import CanvasGrid from "./CanvasGrid";
import clsx from "clsx";
import "./Stats.scss";
import { isGridModeEnabled } from "../../snapping";
interface StatsProps {
app: AppClassProperties;
@ -44,8 +45,7 @@ export const Stats = (props: StatsProps) => {
selectedElementIds: appState.selectedElementIds,
includeBoundTextElement: false,
});
const gridModeEnabled =
props.app.props.gridModeEnabled ?? appState.gridModeEnabled;
const gridModeEnabled = isGridModeEnabled(props.app);
return (
<StatsInner