mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 23:08:11 +08:00
Add support for reordering document tabs (#3999)
* Add support for reordering document tabs * Fix tab bar scrolling * Close tab without activating it on pointerdown
This commit is contained in:
@@ -427,6 +427,13 @@ impl EditorWrapper {
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = reorderDocument)]
|
||||
pub fn reorder_document(&self, document_id: u64, new_index: usize) {
|
||||
let document_id = DocumentId(document_id);
|
||||
let message = PortfolioMessage::ReorderDocument { document_id, new_index };
|
||||
self.dispatch(message);
|
||||
}
|
||||
|
||||
#[wasm_bindgen(js_name = closeDocumentWithConfirmation)]
|
||||
pub fn close_document_with_confirmation(&self, document_id: u64) {
|
||||
let document_id = DocumentId(document_id);
|
||||
|
||||
Reference in New Issue
Block a user