Application prototype #14
@ -104,6 +104,10 @@ details[open]:has(li) .elt-switch::after {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.cst > input {
|
||||
margin: 0px 8px 0px 0px;
|
||||
}
|
||||
|
||||
/* display */
|
||||
|
||||
canvas {
|
||||
|
@ -66,7 +66,8 @@ fn load_gen_assemb(assembly: &Assembly) {
|
||||
assembly.elements_by_id.with_untracked(|elts_by_id| elts_by_id["gemini_a"]),
|
||||
assembly.elements_by_id.with_untracked(|elts_by_id| elts_by_id["gemini_b"])
|
||||
),
|
||||
rep: 0.5
|
||||
rep: 0.5,
|
||||
active: create_signal(true)
|
||||
}
|
||||
);
|
||||
}
|
||||
@ -211,7 +212,8 @@ pub fn AddRemove() -> View {
|
||||
);
|
||||
state.assembly.insert_constraint(Constraint {
|
||||
args: args,
|
||||
rep: 0.0
|
||||
rep: 0.0,
|
||||
active: create_signal(true)
|
||||
});
|
||||
state.selection.update(|sel| sel.clear());
|
||||
|
||||
|
@ -16,7 +16,8 @@ pub struct Element {
|
||||
#[derive(Clone)]
|
||||
pub struct Constraint {
|
||||
pub args: (usize, usize),
|
||||
pub rep: f64
|
||||
pub rep: f64,
|
||||
pub active: Signal<bool>
|
||||
}
|
||||
|
||||
// a complete, view-independent description of an assembly
|
||||
|
@ -136,6 +136,7 @@ pub fn Outline() -> View {
|
||||
let other_arg_label = assembly.elements.with(|elts| elts[other_arg].label.clone());
|
||||
view! {
|
||||
li(class="cst") {
|
||||
input(r#type="checkbox", bind:checked=cst.active)
|
||||
div(class="cst-label") { (other_arg_label) }
|
||||
div(class="cst-rep") { (cst.rep) }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user