File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ export default class extends Controller {
7373
7474 dom . hideElements ( [ '.edit-point' , '.edit-line' , '.edit-polygon' ] )
7575
76+ // Hide stroke color mode dropdown by default (only shown for LineStrings with route extras)
77+ document . querySelector ( '#stroke-color-mode' ) ?. classList . add ( 'hidden' )
78+
7679 // transparent stroke
7780 if ( feature . properties . stroke === 'transparent' ) {
7881 document . querySelector ( '#stroke-color' ) . setAttribute ( 'disabled' , 'true' )
@@ -131,16 +134,13 @@ export default class extends Controller {
131134 // Only show dropdown if there are extras options (more than just the default "Color" option)
132135 if ( colorModeSelect . options . length > 1 ) {
133136 colorModeSelect . classList . remove ( 'hidden' )
134- } else {
135- colorModeSelect . classList . add ( 'hidden' )
136137 }
137138 if ( feature . properties [ 'show-route-extras' ] ) {
138139 document . querySelector ( '#stroke-color' ) . setAttribute ( 'disabled' , 'true' )
139140 }
140141 } else {
141142 // Clear any extra options from previously selected routed features
142143 colorModeSelect . options . length = 1
143- colorModeSelect . classList . add ( 'hidden' )
144144 colorModeSelect . value = ''
145145 }
146146
Original file line number Diff line number Diff line change @@ -57,7 +57,9 @@ class CustomMapLibreGlDirections extends MapLibreGlDirections {
5757 "type" : "WAYPOINT" ,
5858 "id" : functions . featureId ( ) ,
5959 "index" : index ,
60- "label" : String . fromCharCode ( 64 + index + 1 ) ,
60+ "label" : index < 26
61+ ? String . fromCharCode ( 65 + index ) // A-Z
62+ : String . fromCharCode ( 97 + index - 26 ) , // a-z
6163 "highlight" : false
6264 }
6365 }
You can’t perform that action at this time.
0 commit comments