signal_to_timeline

This commit is contained in:
Martin Kavík 2024-06-06 22:45:20 +02:00
parent a37675b094
commit aeb95b982f
10 changed files with 92 additions and 21 deletions

View file

@ -30,9 +30,9 @@ pub(super) async fn load_and_get_signal(signal_ref: wellen::SignalRef) -> wellen
.unwrap_throw()
}
pub(super) async fn timeline(signal_ref: wellen::SignalRef, screen_width: u32) -> shared::Timeline {
pub(super) async fn timeline(signal_ref: wellen::SignalRef, screen_width: u32, block_height: u32) -> shared::Timeline {
serde_wasm_bindgen::from_value(
tauri_glue::timeline(signal_ref.index(), screen_width)
tauri_glue::timeline(signal_ref.index(), screen_width, block_height)
.await
.unwrap_throw(),
)
@ -67,7 +67,7 @@ mod tauri_glue {
pub async fn load_and_get_signal(signal_ref_index: usize) -> Result<JsValue, JsValue>;
#[wasm_bindgen(catch)]
pub async fn timeline(signal_ref_index: usize, screen_width: u32) -> Result<JsValue, JsValue>;
pub async fn timeline(signal_ref_index: usize, screen_width: u32, block_height: u32) -> Result<JsValue, JsValue>;
#[wasm_bindgen(catch)]
pub async fn unload_signal(signal_ref_index: usize) -> Result<(), JsValue>;