Let the elements and regulators write the problem
When we realize an assembly, each element and regulator now writes its own data into the constraint problem.
This commit is contained in:
parent
bb226c5f45
commit
7c40d60103
2 changed files with 95 additions and 31 deletions
|
@ -9,13 +9,13 @@ use web_sys::{
|
|||
use crate::{
|
||||
AppState,
|
||||
assembly,
|
||||
assembly::{ElementKey, Regulator, RegulatorKey},
|
||||
assembly::{ElementKey, ProductRegulator, RegulatorKey},
|
||||
specified::SpecifiedValue
|
||||
};
|
||||
|
||||
// an editable view of a regulator
|
||||
#[component(inline_props)]
|
||||
fn RegulatorInput(regulator: Regulator) -> View {
|
||||
fn RegulatorInput(regulator: ProductRegulator) -> View {
|
||||
let valid = create_signal(true);
|
||||
let value = create_signal(
|
||||
regulator.set_point.with_untracked(|set_pt| set_pt.spec.clone())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue