@@ -151,22 +151,30 @@ const showLegend = computed(() =>
151151 || Boolean (props .taskGrid ?.features .length ),
152152);
153153
154- const taskFeatureCollection = computed <FeatureCollection <Polygon >>(() => ({
155- type: ' FeatureCollection' ,
156- features: props .tasks
157- .filter (task => task .geometry )
158- .map (task => ({
159- type: ' Feature' ,
160- geometry: task .geometry as Polygon ,
161- properties: {
162- id: task .id ,
163- selected: task .id === props .selectedTaskId ,
164- status: task .status ,
165- taskNumber: task .taskNumber ,
166- locked: task .locked ,
167- },
168- })),
169- }));
154+ const taskFeatureCollection = computed <FeatureCollection <Polygon >>(() => {
155+ const sortedTasks = [... props .tasks ].sort ((a , b ) => {
156+ const aSelected = a .id === props .selectedTaskId ? 1 : 0 ;
157+ const bSelected = b .id === props .selectedTaskId ? 1 : 0 ;
158+ return aSelected - bSelected ;
159+ });
160+
161+ return {
162+ type: ' FeatureCollection' ,
163+ features: sortedTasks
164+ .filter (task => task .geometry )
165+ .map (task => ({
166+ type: ' Feature' ,
167+ geometry: task .geometry as Polygon ,
168+ properties: {
169+ id: task .id ,
170+ selected: task .id === props .selectedTaskId ,
171+ status: task .status ,
172+ taskNumber: task .taskNumber ,
173+ locked: task .locked ,
174+ },
175+ })),
176+ };
177+ });
170178
171179const aoiOutlineFeatureCollection = computed <FeatureCollection <LineString | MultiLineString >>(() => ({
172180 type: ' FeatureCollection' ,
@@ -350,8 +358,8 @@ function ensureLayers() {
350358 ' fill-opacity' : [
351359 ' case' ,
352360 [' ==' , [' get' , ' selected' ], true ],
353- 0.94 ,
354- 0.82 ,
361+ 0.9 ,
362+ 0.45 ,
355363 ],
356364 },
357365 };
@@ -364,7 +372,7 @@ function ensureLayers() {
364372 ' line-color' : [
365373 ' case' ,
366374 [' ==' , [' get' , ' selected' ], true ],
367- ' #2f3858 ' ,
375+ ' #2f3661 ' ,
368376 [
369377 ' match' ,
370378 [' coalesce' , [' get' , ' status' ], ' ready_for_mapping' ],
@@ -377,8 +385,8 @@ function ensureLayers() {
377385 ' line-width' : [
378386 ' case' ,
379387 [' ==' , [' get' , ' selected' ], true ],
380- 2.6 ,
381- 2.4 ,
388+ 4.5 ,
389+ 1.5 ,
382390 ],
383391 ' line-opacity' : 1 ,
384392 },
0 commit comments