Skip to content

Commit

Permalink
bug fix: space bar should reset stringFactor to 1, phetsims/chipper#1319
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jan 24, 2023
1 parent 406f158 commit 0305f86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/DynamicStringTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ const WORD_SOURCE = 'Sometimes when Hippopotomonstrosesquippedaliophobia want ly
export default class DynamicStringTest {
public static init(): void {

let stride = 0;
let stringFactor = 1;
let stride = 0;
const words = WORD_SOURCE.split( ' ' );

function setStride( newStride: number ): void {
Expand Down Expand Up @@ -62,6 +62,7 @@ export default class DynamicStringTest {

// Space Bar: reset
else if ( event.keyCode === SPACE_BAR ) {
stringFactor = 1;
stride = 0;
console.log( 'stride = ' + stride );
localizedStrings.forEach( localizedString => localizedString.restoreInitialValue( 'en' ) );
Expand Down

0 comments on commit 0305f86

Please sign in to comment.