diff --git a/src/index.tsx b/src/index.tsx index 2a297f4ae..5fa3060f7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -533,7 +533,7 @@ function renderScene( } } -function saveAsJSON() { +function saveAsJSON(name: string) { const serialized = JSON.stringify({ version: 1, source: window.location.origin, @@ -541,7 +541,7 @@ function saveAsJSON() { }); saveFile( - "excalidraw.json", + `${name}.json`, "data:text/plain;charset=utf-8," + encodeURIComponent(serialized) ); } @@ -1188,13 +1188,6 @@ class App extends React.Component<{}, AppState> { }} >
-

Project name

- {this.state.name && ( - this.updateProjectName(name)} - /> - )}

Shapes

{SHAPES.map(({ value, icon }) => ( @@ -1367,11 +1360,20 @@ class App extends React.Component<{}, AppState> { background
+

Project name

+
+ {this.state.name && ( + this.updateProjectName(name)} + /> + )} +

Save/Load