File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,16 @@ LOGGING:
137137 let displayingIntroduction = $state (false );
138138
139139 const fnc = ' abcdefghijklmnopqrstuvwxyz' ;
140+ /** calculate letter index from number
141+ *
142+ * 0-25 => a-z; 26+ => aa, ab, ... zz
143+ */
144+ function createLetterIndex(index : number ) {
145+ return (
146+ (index >= fnc .length ? fnc .charAt (Math .floor (index / fnc .length ) - 1 ) : ' ' ) +
147+ fnc .charAt (index % fnc .length )
148+ );
149+ }
140150 let planDivObserver = $state (null ); // To store the observer instance
141151 let planObservationCompleted = $state (false );
142152 // Function to observe the visibility of the plan div
@@ -290,7 +300,7 @@ LOGGING:
290300 default :
291301 break ;
292302 }
293- const phraseIndex = fnc . charAt (workspace .currentPhraseIndex );
303+ const phraseIndex = createLetterIndex (workspace .currentPhraseIndex );
294304 div .id = workspace .currentVerse + phraseIndex ;
295305 div .setAttribute (' data-verse' , workspace .currentVerse );
296306 div .setAttribute (' data-phrase' , phraseIndex );
You can’t perform that action at this time.
0 commit comments