File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,9 @@ export function useMinimap() {
102102 const groupColor = computed ( ( ) =>
103103 isLightTheme . value ? '#A2D3EC' : '#1F547A'
104104 )
105+ const groupColorDefault = computed (
106+ ( ) => ( isLightTheme . value ? '#283640' : '#B3C1CB' ) // this is the default group color when using nodeColors setting
107+ )
105108 const bypassColor = computed ( ( ) =>
106109 isLightTheme . value ? '#DBDBDB' : '#4B184B'
107110 )
@@ -249,7 +252,17 @@ export function useMinimap() {
249252 const w = group . size [ 0 ] * scale . value
250253 const h = group . size [ 1 ] * scale . value
251254
252- ctx . fillStyle = groupColor . value
255+ let color = groupColor . value
256+
257+ if ( nodeColors . value ) {
258+ color = group . color ?? groupColorDefault . value
259+
260+ if ( isLightTheme . value ) {
261+ color = adjustColor ( color , { opacity : 0.5 } )
262+ }
263+ }
264+
265+ ctx . fillStyle = color
253266 ctx . fillRect ( x , y , w , h )
254267 }
255268 }
You can’t perform that action at this time.
0 commit comments