Implement "Export" entry in File menu; add Copy/Paste icons in Edit menu

This commit is contained in:
Keavon Chambers
2021-06-01 19:49:04 -07:00
parent d1bf68320e
commit 4bcdbbe092
6 changed files with 25 additions and 7 deletions

View File

@@ -98,6 +98,12 @@ pub fn undo() -> Result<(), JsValue> {
EDITOR_STATE.with(|editor| editor.borrow_mut().handle_message(DocumentMessage::Undo)).map_err(convert_error)
}
/// Export the document
#[wasm_bindgen]
pub fn export_document() -> Result<(), JsValue> {
EDITOR_STATE.with(|editor| editor.borrow_mut().handle_message(DocumentMessage::ExportDocument)).map_err(convert_error)
}
/// Select a layer from the layer list
#[wasm_bindgen]
pub fn select_layer(path: Vec<LayerId>) -> Result<(), JsValue> {