AddRemove: make a button that adds elements

In the process, switch selection storage back to `FxHashSet`, reverting
commit b3afd6f.
This commit is contained in:
Aaron Fenyes 2024-09-27 14:33:49 -07:00
parent 2444649dd1
commit bd0982f821
4 changed files with 74 additions and 33 deletions

View file

@ -4,6 +4,7 @@ mod display;
mod outline;
use nalgebra::DVector;
use rustc_hash::FxHashSet;
use std::collections::BTreeSet;
use sycamore::prelude::*;
@ -15,14 +16,14 @@ use outline::Outline;
#[derive(Clone)]
struct AppState {
assembly: Assembly,
selection: Signal<BTreeSet<usize>>
selection: Signal<FxHashSet<usize>>
}
impl AppState {
fn new() -> AppState {
AppState {
assembly: Assembly::new(),
selection: create_signal(BTreeSet::default())
selection: create_signal(FxHashSet::default())
}
}
}