File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -604,8 +604,11 @@ export class GttClient {
604
604
this . layerArray [ index ] . setVisible ( true )
605
605
}
606
606
607
- getColor ( feature : Feature < Geometry > ) : string {
607
+ getColor ( feature : Feature < Geometry > , isFill : boolean = false ) : string {
608
608
let color = '#000000'
609
+ if ( feature . getGeometry ( ) . getType ( ) !== 'Point' ) {
610
+ color = '#FFD700'
611
+ }
609
612
const plugin_settings = JSON . parse ( this . defaults . pluginSettings )
610
613
const status = document . querySelector ( '#issue_status_id' ) as HTMLInputElement
611
614
@@ -619,6 +622,9 @@ export class GttClient {
619
622
color = plugin_settings [ key ]
620
623
}
621
624
}
625
+ if ( isFill && color !== null && color . length === 7 ) {
626
+ color = color + '33' // Add alpha: 0.2
627
+ }
622
628
return color
623
629
}
624
630
@@ -692,7 +698,7 @@ export class GttClient {
692
698
color : self . getColor ( feature )
693
699
} ) ,
694
700
fill : new Fill ( {
695
- color : [ 255 , 136 , 0 , 0.2 ]
701
+ color : self . getColor ( feature , true ) ,
696
702
} )
697
703
} )
698
704
)
You can’t perform that action at this time.
0 commit comments