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:
Keavon Chambers
2026-04-03 06:35:52 -07:00
committed by GitHub
parent 55115d89d5
commit b52bf7b7d4
7 changed files with 207 additions and 8 deletions
+7
View File
@@ -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);