forked from StudioInfinity/dyna3
chore: relayout per PR discussion/feedback
This commit is contained in:
parent
4a3f47c8b5
commit
760e811ee4
6 changed files with 259 additions and 224 deletions
|
|
@ -63,8 +63,8 @@ fn RegulatorInput(regulator: Rc<dyn Regulator>) -> View {
|
|||
placeholder = measurement.with(|result| result.to_string()),
|
||||
bind:value = value,
|
||||
on:change = move |_| {
|
||||
let specification =
|
||||
SpecifiedValue::try_from(value.get_clone_untracked());
|
||||
let specification
|
||||
= SpecifiedValue::try_from(value.get_clone_untracked());
|
||||
valid.set(
|
||||
match specification {
|
||||
Ok(set_pt) => {
|
||||
|
|
@ -179,8 +179,10 @@ fn ElementOutlineItem(element: Rc<dyn Element>) -> View {
|
|||
move |event: KeyboardEvent| {
|
||||
match event.key().as_str() {
|
||||
"Enter" => {
|
||||
state.select(&element_for_handler,
|
||||
event.shift_key());
|
||||
state.select(
|
||||
&element_for_handler,
|
||||
event.shift_key(),
|
||||
);
|
||||
event.prevent_default();
|
||||
},
|
||||
"ArrowRight" if regulated.get() => {
|
||||
|
|
@ -210,8 +212,8 @@ fn ElementOutlineItem(element: Rc<dyn Element>) -> View {
|
|||
let state_for_handler = state.clone();
|
||||
let element_for_handler = element.clone();
|
||||
move |event: MouseEvent| {
|
||||
state_for_handler.select(&element_for_handler,
|
||||
event.shift_key());
|
||||
state_for_handler.select(
|
||||
&element_for_handler, event.shift_key());
|
||||
event.stop_propagation();
|
||||
event.prevent_default();
|
||||
}
|
||||
|
|
@ -224,8 +226,8 @@ fn ElementOutlineItem(element: Rc<dyn Element>) -> View {
|
|||
input(
|
||||
r#type = "checkbox",
|
||||
bind:checked = element.ghost(),
|
||||
on:click =
|
||||
|event: MouseEvent| event.stop_propagation()
|
||||
on:click
|
||||
= |event: MouseEvent| event.stop_propagation()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue