Skip to content

Commit 7266acf

Browse files
committed
Update CNC settings display condition
remove control-fieldset class from grblHAL dor Mask for consistency
1 parent c8debd7 commit 7266acf

File tree

4 files changed

+43
-18
lines changed

4 files changed

+43
-18
lines changed

src/components/Controls/Fields/Mask.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ const Mask = ({
9696
)
9797

9898
return (
99-
<FieldGroup className="m-1 control-fieldset" id={id} label={label}>
99+
<FieldGroup className="m-1" id={id} label={label}>
100100
{options.map((option, index) => {
101101
const [validation, setvalidation] = useState()
102102
const generateValidation = (fieldData) => {

src/targets/CNC/GRBL/preferences.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
"id": "axis",
173173
"type": "group",
174174
"label": "CN8",
175+
"depend": [{ "id": "showjogpanel", "value": true }],
175176
"value": [
176177
{
177178
"id": "showx",
@@ -215,6 +216,7 @@
215216
"id": "feedrate",
216217
"type": "group",
217218
"label": "CN9",
219+
"depend": [{ "id": "showjogpanel", "value": true }],
218220
"value": [
219221
{
220222
"id": "xyfeedrate",
@@ -304,6 +306,7 @@
304306
"editable": true,
305307
"label": "S212",
306308
"type": "list",
309+
"depend": [{ "id": "showjogpanel", "value": true }],
307310
"value": [
308311
{
309312
"id": "btn+X",

src/targets/CNC/grblHAL/preferences.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
"id": "axis",
186186
"type": "group",
187187
"label": "CN8",
188+
"depend": [{ "id": "showjogpanel", "value": true }],
188189
"value": [
189190
{
190191
"id": "showx",
@@ -300,6 +301,7 @@
300301
"id": "feedrate",
301302
"type": "group",
302303
"label": "CN9",
304+
"depend": [{ "id": "showjogpanel", "value": true }],
303305
"value": [
304306
{
305307
"id": "xyfeedrate",
@@ -463,6 +465,7 @@
463465
"editable": true,
464466
"label": "S212",
465467
"type": "list",
468+
"depend": [{ "id": "showjogpanel", "value": true }],
466469
"value": [
467470
{
468471
"id": "btn+X",

src/targets/CNC/preferences.json

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"id": "openstatusonstart",
1212
"type": "boolean",
1313
"label": "S93",
14-
"value": true
14+
"value": true,
15+
"depend": [{ "id": "showstatuspanel", "value": true }]
1516
}
1617
],
1718
"probe": [
@@ -25,23 +26,26 @@
2526
"id": "openprobeonstart",
2627
"type": "boolean",
2728
"label": "S93",
28-
"value": true
29+
"value": true,
30+
"depend": [{ "id": "showprobepanel", "value": true }]
2931
},
3032
{
3133
"id": "probefeedrate",
3234
"type": "number",
3335
"label": "CN9",
3436
"append": "CN1",
3537
"value": 20,
36-
"min": 1
38+
"min": 1,
39+
"depend": [{ "id": "showprobepanel", "value": true }]
3740
},
3841
{
3942
"id": "maxprobe",
4043
"type": "number",
4144
"label": "CN93",
4245
"value": 15,
4346
"append": "CN96",
44-
"min": 0
47+
"min": 0,
48+
"depend": [{ "id": "showprobepanel", "value": true }]
4549
},
4650
{
4751
"id": "probethickness",
@@ -50,14 +54,16 @@
5054
"value": "1",
5155
"step": "0.001",
5256
"append": "CN96",
53-
"min": 0
57+
"min": 0,
58+
"depend": [{ "id": "showprobepanel", "value": true }]
5459
},
5560
{
5661
"id": "probepostcommand",
5762
"type": "text",
5863
"label": "CN95",
5964
"value": "G10 L20 P0 #selected_axis##probe_thickness#",
60-
"help": "S97"
65+
"help": "S97",
66+
"depend": [{ "id": "showprobepanel", "value": true }]
6167
}
6268
],
6369
"laser": [
@@ -71,12 +77,14 @@
7177
"id": "openlaseronstart",
7278
"type": "boolean",
7379
"label": "S93",
74-
"value": true
80+
"value": true,
81+
"depend": [{ "id": "showlaserpanel", "value": true }]
7582
},
7683
{
7784
"id": "laser",
7885
"type": "group",
7986
"label": "CN90",
87+
"depend": [{ "id": "showlaserpanel", "value": true }],
8088
"value": [
8189
{
8290
"id": "lasertest",
@@ -102,7 +110,8 @@
102110
"type": "number",
103111
"label": "CN84",
104112
"value": 1000,
105-
"min": 1
113+
"min": 1,
114+
"depend": [{ "id": "showlaserpanel", "value": true }]
106115
}
107116
],
108117
"spindle": [
@@ -116,26 +125,30 @@
116125
"id": "openspindleonstart",
117126
"type": "boolean",
118127
"label": "S93",
119-
"value": true
128+
"value": true,
129+
"depend": [{ "id": "showspindlepanel", "value": true }]
120130
},
121131
{
122132
"id": "spindlespeed",
123133
"type": "number",
124134
"label": "CN59",
125135
"value": 1000,
126-
"min": 0
136+
"min": 0,
137+
"depend": [{ "id": "showspindlepanel", "value": true }]
127138
},
128139
{
129140
"id": "showM4ctrls",
130141
"type": "boolean",
131142
"label": "CN70",
132-
"value": true
143+
"value": true,
144+
"depend": [{ "id": "showspindlepanel", "value": true }]
133145
},
134146
{
135147
"id": "showCoolantctrls",
136148
"type": "boolean",
137149
"label": "CN72",
138-
"value": true
150+
"value": true,
151+
"depend": [{ "id": "showspindlepanel", "value": true }]
139152
},
140153
{
141154
"id": "showMistctrls",
@@ -146,7 +159,8 @@
146159
{
147160
"id": "showCoolantctrls",
148161
"value": true
149-
}
162+
},
163+
{ "id": "showspindlepanel", "value": true }
150164
]
151165
},
152166
{
@@ -158,7 +172,8 @@
158172
{
159173
"id": "showMistctrls",
160174
"value": true
161-
}
175+
},
176+
{ "id": "showspindlepanel", "value": true }
162177
]
163178
}
164179
],
@@ -173,14 +188,16 @@
173188
"id": "openoverridesonstart",
174189
"type": "boolean",
175190
"label": "S93",
176-
"value": true
191+
"value": true,
192+
"depend": [{ "id": "showoverridespanel", "value": true }]
177193
}
178194
],
179195
"jog": [
180196
{
181197
"id": "home",
182198
"type": "group",
183199
"label": "CN17",
200+
"depend": [{ "id": "showjogpanel", "value": true }],
184201
"value": [
185202
{
186203
"id": "homesingleaxis",
@@ -202,14 +219,16 @@
202219
"type": "text",
203220
"label": "CN19",
204221
"value": "G10 L20 P0 #",
205-
"help": "CN11"
222+
"help": "CN11",
223+
"depend": [{ "id": "showjogpanel", "value": true }]
206224
},
207225
{
208226
"id": "jogstopcmd",
209227
"type": "text",
210228
"label": "CN23",
211229
"value": "#JOGCANCEL#",
212-
"help": "S97"
230+
"help": "S97",
231+
"depend": [{ "id": "showjogpanel", "value": true }]
213232
}
214233
]
215234
}

0 commit comments

Comments
 (0)