diff --git a/index.html b/index.html index a4fadc5..a64c980 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@

KV diagram calculator

(source code)
- +

Change output specification by scrolling (up => 1, down => 0), typing (=> 1, 0) or deleting (=> -). diff --git a/src/bin/svg-wasm.rs b/src/bin/svg-wasm.rs index 7bdbb5b..93ca707 100644 --- a/src/bin/svg-wasm.rs +++ b/src/bin/svg-wasm.rs @@ -174,9 +174,9 @@ fn init_settings() { let closure = Closure::wrap(Box::new(|| run()) as Box); calculate.add_event_listener_with_callback("click", closure.as_ref().unchecked_ref()).unwrap(); closure.forget(); - let apply_count = web!(document).get_element_by_id("apply-variables").unwrap().unchecked_into::(); + let count = web!(document).get_element_by_id("variables").unwrap().unchecked_into::(); let closure = Closure::wrap(Box::new(|| update_input_grid(&grid(get_var_number()))) as Box); - apply_count.add_event_listener_with_callback("click", closure.as_ref().unchecked_ref()).unwrap(); + count.add_event_listener_with_callback("change", closure.as_ref().unchecked_ref()).unwrap(); closure.forget(); }