Skip to content

Commit

Permalink
feat: ✨ save pan zoom view-mode status
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenull committed Aug 21, 2023
1 parent 0c90e86 commit 4f51843
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Excalidraw",
"name": "excalidraw",
"version": "1.3.0",
"main": "dist/index.html",
"logseq": {
Expand All @@ -12,7 +12,7 @@
"preview": "vite preview"
},
"dependencies": {
"@excalidraw/excalidraw": "^0.15.2",
"@excalidraw/excalidraw": "^0.15.3",
"@logseq/libs": "^0.0.14",
"@radix-ui/react-alert-dialog": "^1.0.3",
"@radix-ui/react-context-menu": "^2.1.3",
Expand Down Expand Up @@ -56,4 +56,4 @@
"vite": "^3.2.4",
"vite-plugin-importer": "^0.2.5"
}
}
}
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ const Editor: React.FC<
: { theme },
files: excalidrawData?.files || undefined,
libraryItems,
scrollToContent: true,
}}
onChange={onExcalidrawChange}
onLibraryChange={onLibraryChange}
Expand Down
9 changes: 8 additions & 1 deletion src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { type AppState } from "@excalidraw/excalidraw/types/types";
import { type ExcalidrawData } from "@/type";
import { AppState } from "@excalidraw/excalidraw/types/types";

export const FONT_ID = {
"Hand-drawn": "Virgil",
Expand Down Expand Up @@ -71,4 +71,11 @@ export const NEW_FILE_EXCALIDRAW_DATA: ExcalidrawData = {
export const APP_STATE_PROPERTIES: Array<keyof AppState> = [
"gridSize",
"viewBackgroundColor",
"zoom",
"offsetTop",
"offsetLeft",
"scrollX",
"scrollY",
"viewModeEnabled",
"zenModeEnabled",
];

0 comments on commit 4f51843

Please sign in to comment.