Multi-document management (create new document; tab switching) (#210)

* Multi-docs WIP

* Change to number

* Add new document and switch documents

* Remove keybind for previous document. Change keybind for next document.

* Switch documents by clicking tabs

* Remove keybind for previous document. Change keybind for next document.

* multi-docs

* Update package-lock.json

* Hook up File>New to add new document

* Remove console logs and empty lines. Start new documents from 2 instead of 1.

* Fix formatting
This commit is contained in:
George Atkinson
2021-06-13 20:24:09 -07:00
committed by GitHub
parent 1c2e667769
commit f6b7708a8f
11 changed files with 133 additions and 12 deletions
@@ -11,6 +11,8 @@ pub enum FrontendMessage {
CollapseFolder { path: Vec<LayerId> },
ExpandFolder { path: Vec<LayerId>, children: Vec<LayerPanelEntry> },
SetActiveTool { tool_name: String },
SetActiveDocument { document_index: usize },
NewDocument { document_name: String },
UpdateCanvas { document: String },
ExportDocument { document: String },
EnableTextInput,
@@ -38,6 +40,7 @@ impl MessageHandler<FrontendMessage, ()> for FrontendMessageHandler {
CollapseFolder,
ExpandFolder,
SetActiveTool,
NewDocument,
UpdateCanvas,
EnableTextInput,
DisableTextInput,