Skip to content

Commit 603115d

Browse files
authored
Merge pull request #34 from zarocknz/sound-trigger
Remove type from soundTrigger parameter
2 parents 077e421 + ceea82d commit 603115d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Winwheel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,7 +2126,7 @@ function Animation(options)
21262126
'callbackBefore' : null, // Function to callback before the wheel is drawn each animation loop.
21272127
'callbackAfter' : null, // Function to callback after the wheel is drawn each animation loop.
21282128
'callbackSound' : null, // Function to callback if a sound should be triggered on change of segment or pin.
2129-
'soundTriggerType' : 'segment' // Sound trigger type. Default is segment which triggers when segment changes, can be pin if to trigger when pin passes the pointer.
2129+
'soundTrigger' : 'segment' // Sound trigger type. Default is segment which triggers when segment changes, can be pin if to trigger when pin passes the pointer.
21302130
};
21312131

21322132
// Now loop through the default options and create properties of this class set to the value for
@@ -2348,7 +2348,7 @@ function winwheelTriggerSound()
23482348
var currentTriggerNumber = 0;
23492349

23502350
// Now figure out if the sound callback should be called depending on the sound trigger type.
2351-
if (winwheelToDrawDuringAnimation.animation.soundTriggerType == 'pin')
2351+
if (winwheelToDrawDuringAnimation.animation.soundTrigger == 'pin')
23522352
{
23532353
// So for the pin type we need to work out which pin we are between.
23542354
currentTriggerNumber = winwheelToDrawDuringAnimation.getCurrentPinNumber();

examples/pins_and_sound_wheel/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ <h1>Winwheel.js example wheel - pins and sound wheel</h1>
100100
'duration' : 15,
101101
'spins' : 8,
102102
'callbackFinished' : alertPrize,
103-
'callbackSound' : playSound, // Function to call when the tick sound is to be triggered.
104-
'soundTriggerType' : 'pin' // Specify pins are to trigger the sound, the other option is 'segment'.
103+
'callbackSound' : playSound, // Function to call when the tick sound is to be triggered.
104+
'soundTrigger' : 'pin' // Specify pins are to trigger the sound, the other option is 'segment'.
105105
},
106106
'pins' :
107107
{

0 commit comments

Comments
 (0)