Compare commits
No commits in common. "3f3c1739cb42dde22c4b20f9198e73d793e3d2a3" and "b3470b597dee3f68e9d9e685ce1974e91eb79251" have entirely different histories.
3f3c1739cb
...
b3470b597d
@ -61,45 +61,45 @@ summary.selected {
|
|||||||
background-color: #444;
|
background-color: #444;
|
||||||
}
|
}
|
||||||
|
|
||||||
summary > div, .constraint {
|
summary > div, .cst {
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.element, .constraint {
|
.elt, .cst {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
padding-right: 8px;
|
padding-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.element-switch {
|
.elt-switch {
|
||||||
width: 18px;
|
width: 18px;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
details:has(li) .element-switch::after {
|
details:has(li) .elt-switch::after {
|
||||||
content: '▸';
|
content: '▸';
|
||||||
}
|
}
|
||||||
|
|
||||||
details[open]:has(li) .element-switch::after {
|
details[open]:has(li) .elt-switch::after {
|
||||||
content: '▾';
|
content: '▾';
|
||||||
}
|
}
|
||||||
|
|
||||||
.element-label {
|
.elt-label {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.constraint-label {
|
.cst-label {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.element-representation {
|
.elt-rep {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.element-representation > div {
|
.elt-rep > div {
|
||||||
padding: 2px 0px 0px 0px;
|
padding: 2px 0px 0px 0px;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
@ -107,26 +107,26 @@ details[open]:has(li) .element-switch::after {
|
|||||||
width: 56px;
|
width: 56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.constraint {
|
.cst {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.constraint.invalid {
|
.cst.invalid {
|
||||||
color: #f58fc2;
|
color: #f58fc2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.constraint > input[type=checkbox] {
|
.cst > input[type=checkbox] {
|
||||||
margin: 0px 8px 0px 0px;
|
margin: 0px 8px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.constraint > input[type=text] {
|
.cst > input[type=text] {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
background-color: inherit;
|
background-color: inherit;
|
||||||
border: 1px solid #555;
|
border: 1px solid #555;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.constraint.invalid > input[type=text] {
|
.cst.invalid > input[type=text] {
|
||||||
border-color: #70495c;
|
border-color: #70495c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ fn ConstraintOutlineItem(constraint_key: ConstraintKey, element_key: ElementKey)
|
|||||||
};
|
};
|
||||||
let other_subject_label = assembly.elements.with(|elts| elts[other_subject].label.clone());
|
let other_subject_label = assembly.elements.with(|elts| elts[other_subject].label.clone());
|
||||||
let class = constraint.lorentz_prod_valid.map(
|
let class = constraint.lorentz_prod_valid.map(
|
||||||
|&lorentz_prod_valid| if lorentz_prod_valid { "constraint" } else { "constraint invalid" }
|
|&lorentz_prod_valid| if lorentz_prod_valid { "cst" } else { "cst invalid" }
|
||||||
);
|
);
|
||||||
view! {
|
view! {
|
||||||
li(class=class.get()) {
|
li(class=class.get()) {
|
||||||
input(r#type="checkbox", bind:checked=constraint.active)
|
input(r#type="checkbox", bind:checked=constraint.active)
|
||||||
div(class="constraint-label") { (other_subject_label) }
|
div(class="cst-label") { (other_subject_label) }
|
||||||
LorentzProductInput(constraint=constraint)
|
LorentzProductInput(constraint=constraint)
|
||||||
div(class="status")
|
div(class="status")
|
||||||
}
|
}
|
||||||
@ -115,11 +115,11 @@ fn ElementOutlineItem(key: ElementKey, element: assembly::Element) -> View {
|
|||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
div(
|
div(
|
||||||
class="element-switch",
|
class="elt-switch",
|
||||||
on:click=|event: MouseEvent| event.stop_propagation()
|
on:click=|event: MouseEvent| event.stop_propagation()
|
||||||
)
|
)
|
||||||
div(
|
div(
|
||||||
class="element",
|
class="elt",
|
||||||
on:click={
|
on:click={
|
||||||
move |event: MouseEvent| {
|
move |event: MouseEvent| {
|
||||||
if event.shift_key() {
|
if event.shift_key() {
|
||||||
@ -139,8 +139,8 @@ fn ElementOutlineItem(key: ElementKey, element: assembly::Element) -> View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
div(class="element-label") { (label) }
|
div(class="elt-label") { (label) }
|
||||||
div(class="element-representation") {
|
div(class="elt-rep") {
|
||||||
Indexed(
|
Indexed(
|
||||||
list=rep_components,
|
list=rep_components,
|
||||||
view=|coord_str| view! {
|
view=|coord_str| view! {
|
||||||
|
Loading…
Reference in New Issue
Block a user