Skip to content

Commit

Permalink
fix sound for Focal Length control, #259
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Mar 7, 2022
1 parent 800a878 commit 858a87a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/common/view/FocalLengthControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ class FocalLengthControl extends NumberControl {
constrainValue: ( value: number ) => Utils.roundToInterval( value, GOConstants.FOCAL_LENGTH_SLIDER_STEP ),
keyboardStep: GOConstants.FOCAL_LENGTH_KEYBOARD_STEP, // used by all alternative-input devices
shiftKeyboardStep: GOConstants.FOCAL_LENGTH_SHIFT_KEYBOARD_STEP, // finer grain, used by keyboard only
pageKeyboardStep: GOConstants.FOCAL_LENGTH_PAGE_KEYBOARD_STEP // coarser grain, used by keyboard only
pageKeyboardStep: GOConstants.FOCAL_LENGTH_PAGE_KEYBOARD_STEP, // coarser grain, used by keyboard only

// generate a sound for each slider step
soundGeneratorOptions: {
numberOfMiddleThresholds: focalLengthMagnitudeProperty.range!.getLength() / GOConstants.FOCAL_LENGTH_SLIDER_STEP - 1
}
}
} );

Expand Down

0 comments on commit 858a87a

Please sign in to comment.