Skip to content

Commit d84b59a

Browse files
committed
style edit form
1 parent 418888c commit d84b59a

2 files changed

Lines changed: 21 additions & 14 deletions

File tree

app/assets/stylesheets/feature.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@
273273
left: 0.75rem;
274274
}
275275

276+
.edit-ui .left-label {
277+
width: 5rem;
278+
}
279+
276280
#feature-show-title-ui {
277281
padding-top: 0.2rem;
278282
gap: 0.5rem;

app/views/maps/modals/feature/_edit_ui.haml

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,70 +22,73 @@
2222
.feature-edit-section.hidden{ 'data-edit-section': "style" }
2323
.feature-section-card.pt-2
2424
#point-size-ui.edit-ui.edit-point
25-
%label{ for: "point-size"} Size:
25+
%label.left-label{ for: "point-size"} Size:
2626
%input.slider#point-size{ type: "range", min: "1", max: "75", value: "1", 'data-action': "input->feature--edit#addUndo input->feature--edit#updatePointSize change->feature--edit#saveFeature" }
2727
%span#point-size-val.text-muted.small
2828

2929
#point-scaling-ui.edit-ui.edit-point
30-
%label.edit-polygon.edit-line{ for: "point-scaling"} Point scaling:
30+
%label.left-label.edit-polygon.edit-line{ for: "point-scaling"} Point scaling:
3131
%input#point-scaling{type: "checkbox", data: { action: "input->feature--edit#addUndo input->feature--edit#updatePointScaling change->feature--edit#saveFeature"} }
3232
%label{ for: "point-scaling"} Scaled with zoom
3333
3434
#line-width-ui.edit-ui.edit-line
35-
%label{ for: "line-width"} Width:
35+
%label.left-label{ for: "line-width"} Width:
3636
%input.slider#line-width{ type: "range", min: "1", max: "15", value: "1", 'data-action': "input->feature--edit#addUndo input->feature--edit#updateLineWidth change->feature--edit#saveFeature" }
3737
%span#line-width-val.text-muted.small
3838

3939
#outline-width-ui.edit-ui.edit-polygon
40-
%label{ for: "outline-width"} Line width:
40+
%label.left-label{ for: "outline-width"} Line width:
4141
%input.slider#outline-width{ type: "range", min: "0", max: "15", value: "1", 'data-action': "input->feature--edit#addUndo input->feature--edit#updateOutLineWidth change->feature--edit#saveFeature" }
4242
%span#outline-width-val.text-muted.small
4343

4444
#stroke-color-ui.edit-ui.edit-line.edit-polygon.edit-point
45-
%label.edit-polygon.edit-line{ for: "stroke-color"} Line color:
46-
%label.edit-point{ for: "stroke-color"} Border color:
45+
%label.left-label.edit-polygon.edit-line{ for: "stroke-color"} Line color:
46+
%label.left-label.edit-point{ for: "stroke-color"} Border color:
4747
%input.form-control#stroke-color{ type: "color", 'data-action': "input->feature--edit#addUndo input->feature--edit#updateStrokeColor change->feature--edit#saveFeature" }
4848
%div.edit-polygon.edit-point
4949
%input#stroke-color-transparent{type: "checkbox", data: { action: "input->feature--edit#addUndo input->feature--edit#updateStrokeColorTransparent change->feature--edit#saveFeature"} }
5050
%label{ for: "stroke-color-transparent"}transparent
5151
5252
#fill-color-ui.edit-ui.edit-polygon.edit-point
53-
%label{ for: "fill-color"} Fill color:
53+
%label.left-label{ for: "fill-color"} Fill color:
5454
%input.form-control#fill-color{ type: "color", 'data-action': "input->feature--edit#addUndo input->feature--edit#updateFillColor change->feature--edit#saveFeature" }
5555
%div
5656
%input#fill-color-transparent{type: "checkbox", value: 'transparent', data: { action: "input->feature--edit#addUndo input->feature--edit#updateFillColorTransparent change->feature--edit#saveFeature"} }
5757
%label{ for: "fill-color-transparent"}transparent
5858
5959
#opacity-ui.edit-ui.edit-polygon
60-
%label{ for: "opacity"} Opacity:
60+
%label.left-label{ for: "opacity"} Opacity:
6161
%input.slider#opacity{ type: "range", min: "1", max: "10", value: "7", 'data-action': "input->feature--edit#addUndo input->feature--edit#updateOpacity change->feature--edit#saveFeature" }
6262
%span#opacity-val.text-muted.small
6363

6464
#marker-symbol-ui.edit-ui.edit-point
65-
%label{ for: "marker-symbol"} Symbol:
65+
%label.left-label{ for: "marker-symbol"} Symbol:
6666
%span#emoji
6767
%input.form-control#marker-symbol{ type: "hidden", inputmode: 'emoji' }
68-
#marker-symbol-select.btn.btn-blue.ps-1.pe-2{ 'data-action': "click->feature--edit#openEmojiPicker" }
68+
#marker-symbol-select.btn.btn-secondary.ps-1.pe-2{ 'data-action': "click->feature--edit#openEmojiPicker" }
6969
%i.bi.bi-pencil-square.ms-1#no-emoji
7070

7171
#marker-image-ui.edit-ui.edit-point
72-
%label{ for: "marker-image"} Image:
72+
%label.left-label{ for: "marker-image"} Image:
7373
.feature-image
7474
- if @user
75-
%label.btn.btn-blue.p-1.ps-2.pe-2{for: 'marker-image'}
75+
%label.btn.btn-secondary.p-1.ps-2.pe-2{for: 'marker-image'}
7676
%i.bi.bi-upload
7777
%input.form-control#marker-image.hidden{ type: "file", 'data-action': "input->feature--edit#addUndo change->feature--edit#updateMarkerImage" }
7878
- else
7979
%i.bi.bi-info-circle
8080
Please log in to upload images
8181

8282
#fill-extrusion-height-ui.edit-ui.edit-line.edit-polygon
83-
%label{ for: "fill-extrusion-height"} Height:
83+
%label.left-label{ for: "fill-extrusion-height"} Height:
8484
%input.slider#fill-extrusion-height{ type: "range", min: "0", max: "500", value: "0", 'data-action': "input->feature--edit#addUndo input->feature--edit#updateFillExtrusionHeight change->feature--edit#saveFeature" }
8585
%span#fill-extrusion-height-val.text-muted.small
8686

8787
#show-km-markers-ui.edit-ui.edit-line
88-
%label.edit-line{ for: "show-km-markers"} Show km markers:
88+
%label.left-label.edit-line{ for: "show-km-markers"}
89+
Distance
90+
%br
91+
markers:
8992
%input#show-km-markers{type: "checkbox", data: { action: "input->feature--edit#addUndo input->feature--edit#updateShowKmMarkers change->feature--edit#saveFeature"} }
9093

9194
.feature-edit-section.hidden{ 'data-edit-section': "advanced" }

0 commit comments

Comments
 (0)