forked from StudioInfinity/dyna3
Improve naming of constraint subjects
This commit is contained in:
parent
da008fd090
commit
ed1890bffc
3 changed files with 16 additions and 16 deletions
|
@ -208,16 +208,16 @@ pub fn AddRemove() -> View {
|
|||
},
|
||||
on:click=|_| {
|
||||
let state = use_context::<AppState>();
|
||||
let args = state.selection.with(
|
||||
let subjects = state.selection.with(
|
||||
|sel| {
|
||||
let arg_vec: Vec<_> = sel.into_iter().collect();
|
||||
(arg_vec[0].clone(), arg_vec[1].clone())
|
||||
let subject_vec: Vec<_> = sel.into_iter().collect();
|
||||
(subject_vec[0].clone(), subject_vec[1].clone())
|
||||
}
|
||||
);
|
||||
let rep = create_signal(0.0);
|
||||
let active = create_signal(true);
|
||||
state.assembly.insert_constraint(Constraint {
|
||||
args: args,
|
||||
subjects: subjects,
|
||||
rep: rep,
|
||||
rep_text: create_signal(String::new()),
|
||||
rep_valid: create_signal(false),
|
||||
|
@ -233,8 +233,8 @@ pub fn AddRemove() -> View {
|
|||
for (_, cst) in csts.into_iter() {
|
||||
console::log_5(
|
||||
&JsValue::from(" "),
|
||||
&JsValue::from(cst.args.0),
|
||||
&JsValue::from(cst.args.1),
|
||||
&JsValue::from(cst.subjects.0),
|
||||
&JsValue::from(cst.subjects.1),
|
||||
&JsValue::from(":"),
|
||||
&JsValue::from(cst.rep.get_untracked())
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue