diagram plugins
This commit is contained in:
parent
1cdb558823
commit
e8a0051ea7
29 changed files with 1781 additions and 267 deletions
|
@ -3,10 +3,15 @@ use wellen::GetItem;
|
|||
use zoon::*;
|
||||
|
||||
type FullVarName = String;
|
||||
|
||||
type AddedDecodersCount = usize;
|
||||
type RemovedDecodersCount = usize;
|
||||
type DecoderPath = String;
|
||||
|
||||
type AddedDiagramConnectorsCount = usize;
|
||||
type RemovedDiagramConnectorsCount = usize;
|
||||
type DiagramConnectorPath = String;
|
||||
|
||||
#[wasm_bindgen(module = "/typescript/bundles/strict_eval.js")]
|
||||
extern "C" {
|
||||
#[wasm_bindgen(catch)]
|
||||
|
@ -91,4 +96,16 @@ impl FW {
|
|||
controller.draw_diagram_element(excalidraw_element)
|
||||
}
|
||||
}
|
||||
|
||||
/// JS: `FW.add_diagram_connectors(["../test_files/components/rust_diagram_connector/rust_diagram_connector.wasm"])` -> `1`
|
||||
pub async fn add_diagram_connectors(
|
||||
connector_paths: Vec<DiagramConnectorPath>,
|
||||
) -> AddedDiagramConnectorsCount {
|
||||
platform::add_diagram_connectors(connector_paths).await
|
||||
}
|
||||
|
||||
/// JS: `FW.remove_all_diagram_connectors()` -> `5`
|
||||
pub async fn remove_all_diagram_connectors() -> RemovedDiagramConnectorsCount {
|
||||
platform::remove_all_diagram_connectors().await
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue