mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-31 19:04:35 +01:00 
			
		
		
		
	remove unused selectedId
This commit is contained in:
		| @@ -341,12 +341,10 @@ export async function exportCanvas( | |||||||
|  |  | ||||||
| export async function loadScene(id: string | null, privateKey?: string) { | export async function loadScene(id: string | null, privateKey?: string) { | ||||||
|   let data; |   let data; | ||||||
|   let selectedId; |  | ||||||
|   if (id != null) { |   if (id != null) { | ||||||
|     // the private key is used to decrypt the content from the server, take |     // the private key is used to decrypt the content from the server, take | ||||||
|     // extra care not to leak it |     // extra care not to leak it | ||||||
|     data = await importFromBackend(id, privateKey); |     data = await importFromBackend(id, privateKey); | ||||||
|     selectedId = id; |  | ||||||
|     window.history.replaceState({}, "Excalidraw", window.location.origin); |     window.history.replaceState({}, "Excalidraw", window.location.origin); | ||||||
|   } else { |   } else { | ||||||
|     data = restoreFromLocalStorage(); |     data = restoreFromLocalStorage(); | ||||||
| @@ -354,6 +352,6 @@ export async function loadScene(id: string | null, privateKey?: string) { | |||||||
|  |  | ||||||
|   return { |   return { | ||||||
|     elements: data.elements, |     elements: data.elements, | ||||||
|     appState: data.appState && { ...data.appState, selectedId }, |     appState: data.appState && { ...data.appState }, | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|   | |||||||
| @@ -7,5 +7,4 @@ export interface DataState { | |||||||
|   source?: string; |   source?: string; | ||||||
|   elements: readonly ExcalidrawElement[]; |   elements: readonly ExcalidrawElement[]; | ||||||
|   appState: AppState | null; |   appState: AppState | null; | ||||||
|   selectedId?: number; |  | ||||||
| } | } | ||||||
|   | |||||||
| @@ -28,7 +28,6 @@ export type AppState = { | |||||||
|   cursorY: number; |   cursorY: number; | ||||||
|   scrolledOutside: boolean; |   scrolledOutside: boolean; | ||||||
|   name: string; |   name: string; | ||||||
|   selectedId?: string; |  | ||||||
|   isCollaborating: boolean; |   isCollaborating: boolean; | ||||||
|   isResizing: boolean; |   isResizing: boolean; | ||||||
|   zoom: number; |   zoom: number; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 dwelle
					dwelle