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:
Aaron Fenyes 2025-03-25 02:15:03 -07:00
parent bb226c5f45
commit 7c40d60103
2 changed files with 95 additions and 31 deletions

View file

@ -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())