Skip to content

Commit 4eba50a

Browse files
rsrg-zwiamamanisandro
authored andcommitted
AttributeForm: hide parent when child is active
Ensures child controls heigth of editing panel
1 parent 776235c commit 4eba50a

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

components/AttributeForm.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ class AttributeForm extends React.Component {
147147
readOnlyMsg = LocaleUtils.tr("editing.geomnonzeroz");
148148
}
149149
return (
150-
<div className="AttributeForm">
150+
<div className={`AttributeForm ${this.state.childEdit ? "attrib-form-has-child" : ""}`}>
151151
{readOnlyMsg ? (
152152
<div className="attrib-form-geom-readonly">{readOnlyMsg}</div>
153153
) : null}
154-
<form action="" onChange={ev => this.formChanged(ev)} onSubmit={this.onSubmit} ref={this.setupChangedObserver}>
154+
<form action="" className="attrib-form-parent-form" onChange={ev => this.formChanged(ev)} onSubmit={this.onSubmit} ref={this.setupChangedObserver}>
155155
{editConfig.form ? (
156156
<QtDesignerForm addRelationRecord={this.addRelationRecord} editConfig={editConfig}
157157
editRelationRecord={this.editRelationRecord}

components/style/AttributeForm.css

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ div.AttributeForm {
55
padding: 0.25em;
66
}
77

8-
div.AttributeForm > form {
8+
.AttributeForm.attrib-form-has-child > :not(.link-feature-form-container),
9+
.AttributeForm.attrib-form-has-child ~ .link-feature-form-close{
10+
display: none;
11+
}
12+
13+
div.AttributeForm > form.attrib-form-parent-form {
914
flex: 1 1 auto;
1015
display: flex;
1116
flex-direction: column;
@@ -41,15 +46,9 @@ div.AttributeForm div.attrib-form-busy {
4146
}
4247

4348
div.link-feature-form-container {
44-
position: absolute;
45-
left: 0;
46-
right: 0;
47-
top: 0;
48-
bottom: 0;
49-
background-color: rgba(200, 200, 200, 0.5);
50-
padding: 1em;
5149
display: flex;
5250
flex-direction: column;
51+
overflow: hidden;
5352
}
5453

5554
div.link-feature-form-container > div.link-feature-form {

components/style/LinkFeatureForm.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ div.link-feature-form {
33
border: 2px solid var(--border-color);
44
display: flex;
55
flex-direction: column;
6+
min-height: 0;
67
padding: 0.5em;
78
height: 100%;
89
}
910

1011
div.link-feature-form > div.AttributeForm {
1112
flex: 1 1 auto;
12-
height: 0;
13+
min-height: 0;
14+
overflow-y: auto;
1315
}
1416

1517
div.link-feature-form-feature-list {

0 commit comments

Comments
 (0)