mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-07-22 23:25:01 +00:00
Clean up MenuList types and fix many Vue and Clippy warnings
Also remove hard-coded-in-Vue Graphite logo in the menu bar in favor of a Rust definition.
This commit is contained in:
parent
1a90a4db86
commit
3a84de32ac
27 changed files with 361 additions and 374 deletions
|
@ -137,6 +137,12 @@ impl JsEditorHandle {
|
|||
EDITOR_HAS_CRASHED.load(Ordering::SeqCst)
|
||||
}
|
||||
|
||||
/// Answer whether or not the editor is in development mode
|
||||
#[wasm_bindgen(js_name = inDevelopmentMode)]
|
||||
pub fn in_development_mode(&self) -> bool {
|
||||
cfg!(debug_assertions)
|
||||
}
|
||||
|
||||
/// Get the constant `FILE_SAVE_SUFFIX`
|
||||
#[wasm_bindgen(js_name = fileSaveSuffix)]
|
||||
pub fn file_save_suffix(&self) -> String {
|
||||
|
@ -218,12 +224,6 @@ impl JsEditorHandle {
|
|||
self.dispatch(message);
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = requestComingSoonDialog)]
|
||||
pub fn request_coming_soon_dialog(&self, issue: Option<i32>) {
|
||||
let message = DialogMessage::RequestComingSoonDialog { issue };
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
/// Send new bounds when document panel viewports get resized or moved within the editor
|
||||
/// [left, top, right, bottom]...
|
||||
#[wasm_bindgen(js_name = boundsOfViewports)]
|
||||
|
@ -468,6 +468,7 @@ impl JsEditorHandle {
|
|||
|
||||
impl Drop for JsEditorHandle {
|
||||
fn drop(&mut self) {
|
||||
// Consider removing after https://github.com/rustwasm/wasm-bindgen/pull/2984 is merged and released
|
||||
EDITOR_INSTANCES.with(|instances| instances.borrow_mut().remove(&self.editor_id));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue