Skip to content

Commit 5bb74e8

Browse files
cioddiMartin Alzueta
andauthored
UI/feature editor style (#192)
* edit polygon style * style komplett * style for inactive geometries --------- Co-authored-by: Martin Alzueta <martin.alzueta@wheregroup.com>
1 parent ac43393 commit 5bb74e8

File tree

1 file changed

+33
-26
lines changed

1 file changed

+33
-26
lines changed

src/hooks/useFeatureEditor/utils/FeatureEditorStyle.tsx

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,23 @@ function featureEditorStyle() {
1313
['!=', 'mode', 'static'],
1414
],
1515
paint: {
16-
'fill-color': '#3bb2d0',
17-
'fill-outline-color': '#3bb2d0',
18-
'fill-opacity': 0.1,
16+
'fill-color': '#009EE0',
17+
'fill-outline-color': '#009EE0',
18+
'fill-opacity': 0.3,
1919
},
2020
},
21+
2122
{
2223
id: 'gl-draw-polygon-fill-active',
2324
type: 'fill',
2425
filter: ['all', ['==', 'active', 'true'], ['==', '$type', 'Polygon']],
2526
paint: {
26-
'fill-color': '#fbb03b',
27-
'fill-outline-color': '#fbb03b',
28-
'fill-opacity': 0.1,
29-
},
30-
},
31-
{
32-
id: 'gl-draw-polygon-midpoint',
33-
type: 'circle',
34-
filter: ['all', ['==', '$type', 'Point'], ['==', 'meta', 'midpoint']],
35-
paint: {
36-
'circle-radius': mediaIsMobile ? 7 : 5,
37-
'circle-color': '#fbb03b',
27+
'fill-color': '#009EE0',
28+
'fill-outline-color': '#009EE0',
29+
'fill-opacity': 0.2,
3830
},
3931
},
32+
4033
{
4134
id: 'gl-draw-polygon-stroke-inactive',
4235
type: 'line',
@@ -51,8 +44,8 @@ function featureEditorStyle() {
5144
'line-join': 'round',
5245
},
5346
paint: {
54-
'line-color': '#3bb2d0',
55-
'line-width': 2,
47+
'line-color': '#009EE0',
48+
'line-width': 3,
5649
},
5750
},
5851
{
@@ -64,11 +57,12 @@ function featureEditorStyle() {
6457
'line-join': 'round',
6558
},
6659
paint: {
67-
'line-color': '#fbb03b',
60+
'line-color': '#009EE0',
6861
'line-dasharray': [0.2, 2],
6962
'line-width': 2,
7063
},
7164
},
65+
7266
{
7367
id: 'gl-draw-line-inactive',
7468
type: 'line',
@@ -83,8 +77,8 @@ function featureEditorStyle() {
8377
'line-join': 'round',
8478
},
8579
paint: {
86-
'line-color': '#3bb2d0',
87-
'line-width': 2,
80+
'line-color': '#009EE0',
81+
'line-width': 3,
8882
},
8983
},
9084
{
@@ -96,11 +90,22 @@ function featureEditorStyle() {
9690
'line-join': 'round',
9791
},
9892
paint: {
99-
'line-color': '#fbb03b',
93+
'line-color': "#009EE0",
10094
'line-dasharray': [0.2, 2],
10195
'line-width': 2,
10296
},
10397
},
98+
{
99+
id: 'gl-draw-polygon-midpoint',
100+
type: 'circle',
101+
filter: ['all', ['==', '$type', 'Point'], ['==', 'meta', 'midpoint']],
102+
paint: {
103+
'circle-radius': mediaIsMobile ? 5 : 4,
104+
'circle-color': '#ffffff',
105+
'circle-stroke-color': '#009EE0',
106+
'circle-stroke-width': 1
107+
},
108+
},
104109
{
105110
id: 'gl-draw-polygon-and-line-vertex-stroke-inactive',
106111
type: 'circle',
@@ -114,9 +119,11 @@ function featureEditorStyle() {
114119
id: 'gl-draw-polygon-and-line-vertex-inactive',
115120
type: 'circle',
116121
filter: ['all', ['==', 'meta', 'vertex'], ['==', '$type', 'Point'], ['!=', 'mode', 'static']],
117-
paint: {
122+
paint: {
118123
'circle-radius': mediaIsMobile ? 7 : 5,
119-
'circle-color': '#fbb03b',
124+
'circle-color': '#ffffff',
125+
'circle-stroke-color': '#009EE0',
126+
'circle-stroke-width': 1
120127
},
121128
},
122129
{
@@ -132,7 +139,7 @@ function featureEditorStyle() {
132139
paint: {
133140
'circle-radius': mediaIsMobile ? 10 : 9,
134141
'circle-opacity': 1,
135-
'circle-color': '#fff',
142+
'circle-color': '#009EE0',
136143
},
137144
},
138145
{
@@ -147,7 +154,7 @@ function featureEditorStyle() {
147154
],
148155
paint: {
149156
'circle-radius': mediaIsMobile ? 7.5 : 6.5,
150-
'circle-color': '#3bb2d0',
157+
'circle-color': '#009EE0',
151158
},
152159
},
153160
{
@@ -175,7 +182,7 @@ function featureEditorStyle() {
175182
],
176183
paint: {
177184
'circle-radius': mediaIsMobile ? 8.5 : 7.5,
178-
'circle-color': '#fbb03b',
185+
'circle-color': '#009EE0',
179186
},
180187
},
181188
{

0 commit comments

Comments
 (0)