Add frontend file structure docs and some related cleanup

This commit is contained in:
Keavon Chambers
2022-05-23 19:24:31 -07:00
parent ab77105ffb
commit bec7a4c109
21 changed files with 168 additions and 145 deletions
+3 -2
View File
@@ -1,7 +1,8 @@
pub mod api;
pub mod editor_api;
pub mod helpers;
use helpers::{panic_hook, WasmLog};
use std::cell::RefCell;
use std::collections::HashMap;
use std::panic;
@@ -13,7 +14,7 @@ pub static EDITOR_HAS_CRASHED: AtomicBool = AtomicBool::new(false);
pub static LOGGER: WasmLog = WasmLog;
thread_local! {
pub static EDITOR_INSTANCES: RefCell<HashMap<u64, editor::Editor>> = RefCell::new(HashMap::new());
pub static JS_EDITOR_HANDLES: RefCell<HashMap<u64, api::JsEditorHandle>> = RefCell::new(HashMap::new());
pub static JS_EDITOR_HANDLES: RefCell<HashMap<u64, editor_api::JsEditorHandle>> = RefCell::new(HashMap::new());
}
/// Initialize the backend