mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Remove previously loaded scenes (#734)
As mentioned in #724, the current implementation is suboptimal. Let's remove it until we come back with a better design. Fixes #724
This commit is contained in:
parent
8d64ec8153
commit
935a7f58a7
13 changed files with 3 additions and 122 deletions
|
@ -31,7 +31,6 @@ import {
|
|||
hasStroke,
|
||||
hasText,
|
||||
exportCanvas,
|
||||
loadedScenes,
|
||||
loadScene,
|
||||
calculateScrollCenter,
|
||||
loadFromBlob,
|
||||
|
@ -96,7 +95,6 @@ import { ExportDialog } from "./components/ExportDialog";
|
|||
import { LanguageList } from "./components/LanguageList";
|
||||
import { Point } from "roughjs/bin/geometry";
|
||||
import { t, languages, setLanguage, getLanguage } from "./i18n";
|
||||
import { StoredScenesList } from "./components/StoredScenesList";
|
||||
import { HintViewer } from "./components/HintViewer";
|
||||
|
||||
import { copyToAppClipboard, getClipboardContent } from "./clipboard";
|
||||
|
@ -318,22 +316,6 @@ const LayerUI = React.memo(
|
|||
);
|
||||
}
|
||||
|
||||
function renderIdsDropdown() {
|
||||
const scenes = loadedScenes();
|
||||
if (scenes.length === 0) {
|
||||
return;
|
||||
}
|
||||
return (
|
||||
<StoredScenesList
|
||||
scenes={scenes}
|
||||
currentId={appState.selectedId}
|
||||
onChange={async (id, k) =>
|
||||
actionManager.updater(await loadScene(id, k))
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<FixedSideContainer side="top">
|
||||
|
@ -400,7 +382,6 @@ const LayerUI = React.memo(
|
|||
languages={languages}
|
||||
currentLanguage={language}
|
||||
/>
|
||||
{renderIdsDropdown()}
|
||||
{appState.scrolledOutside && (
|
||||
<button
|
||||
className="scroll-back-to-content"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue