remove HierarchyAndTimeTable

This commit is contained in:
Martin Kavík 2024-06-07 23:18:06 +02:00
parent 4906634ffb
commit bc023d38b8
11 changed files with 50 additions and 88 deletions

View file

@ -74,13 +74,6 @@ pub(super) async fn get_hierarchy() -> wellen::Hierarchy {
serde_json::from_value(serde_json::to_value(hierarchy).unwrap_throw()).unwrap_throw()
}
pub(super) async fn get_time_table() -> wellen::TimeTable {
let waveform = STORE.waveform.lock().unwrap_throw();
let time_table = waveform.as_ref().unwrap_throw().time_table();
// @TODO Wrap `time_table` in `Waveform` with `Rc/Arc` or add the method `take` / `clone` or refactor?
serde_json::from_value(serde_json::to_value(time_table).unwrap_throw()).unwrap_throw()
}
pub(super) async fn load_signal_and_get_timeline(
signal_ref: wellen::SignalRef,
screen_width: u32,

View file

@ -17,10 +17,6 @@ pub(super) async fn get_hierarchy() -> wellen::Hierarchy {
serde_wasm_bindgen::from_value(tauri_glue::get_hierarchy().await.unwrap_throw()).unwrap_throw()
}
pub(super) async fn get_time_table() -> wellen::TimeTable {
serde_wasm_bindgen::from_value(tauri_glue::get_time_table().await.unwrap_throw()).unwrap_throw()
}
pub(super) async fn load_signal_and_get_timeline(
signal_ref: wellen::SignalRef,
screen_width: u32,
@ -55,9 +51,6 @@ mod tauri_glue {
#[wasm_bindgen(catch)]
pub async fn get_hierarchy() -> Result<JsValue, JsValue>;
#[wasm_bindgen(catch)]
pub async fn get_time_table() -> Result<JsValue, JsValue>;
#[wasm_bindgen(catch)]
pub async fn load_signal_and_get_timeline(
signal_ref_index: usize,