@@ -94,6 +94,7 @@ export class RuneSVG extends Component<Props, State> {
94
94
this . applyStylesToGuideSegments ( ) ;
95
95
this . applyStylesToRealSegments ( ) ;
96
96
this . applyStylesToInteractiveSegments ( ) ;
97
+ this . applyStylesToPhonemeText ( ) ;
97
98
98
99
// Apply styles to the SVG
99
100
this . applyGeneralSVGStyles ( ) ;
@@ -172,6 +173,15 @@ export class RuneSVG extends Component<Props, State> {
172
173
} ) ;
173
174
}
174
175
176
+ private applyStylesToPhonemeText ( ) {
177
+ // Text layer segments
178
+ this . textLayer
179
+ ?. querySelectorAll ( "text" )
180
+ . forEach ( ( segment ) => {
181
+ segment . setAttribute ( "fill" , this . state . runeColor ) ;
182
+ } ) ;
183
+ }
184
+
175
185
// --- Listener
176
186
177
187
private onInteractiveSegmentClick = ( event : Event ) => {
@@ -326,28 +336,28 @@ export class RuneSVG extends Component<Props, State> {
326
336
>
327
337
< g
328
338
ref = { ( e ) => ( this . guideLayer = e ) }
329
- className = "runic-layer--guide"
339
+ className = "runic-layer runic-layer --guide"
330
340
>
331
341
{ ...tokenLayers . guide }
332
342
</ g >
333
343
< g
334
344
ref = { ( e ) => ( this . realLayer = e ) }
335
- className = "runic-layer--real"
345
+ className = "runic-layer runic-layer --real"
336
346
>
337
347
{ ...tokenLayers . real }
338
348
</ g >
339
349
{ props . interactive && (
340
350
< g
341
351
ref = { ( e ) => ( this . interactiveLayer = e ) }
342
- className = "runic-layer--interactive"
352
+ className = "runic-layer runic-layer --interactive"
343
353
>
344
354
{ ...tokenLayers . interactive }
345
355
</ g >
346
356
) }
347
357
{ state . displayPhonemes && (
348
358
< g
349
359
ref = { ( e ) => ( this . textLayer = e ) }
350
- className = "runic-layer--text"
360
+ className = "runic-layer runic-layer --text"
351
361
>
352
362
{ ...tokenLayers . text }
353
363
</ g >
0 commit comments