diff --git a/demo.html b/demo.html index 64535ae..9bab0ac 100644 --- a/demo.html +++ b/demo.html @@ -19,6 +19,7 @@ alert('SELECTED : ' + key + ' => ' + value); }, spinText : 'Click Me', + minSpinMilliseconds : 4000, }); }); @@ -30,4 +31,4 @@ - \ No newline at end of file + diff --git a/src/rouletteWheel.js b/src/rouletteWheel.js index a0bab16..f9250b4 100644 --- a/src/rouletteWheel.js +++ b/src/rouletteWheel.js @@ -41,6 +41,7 @@ $.widget('javobyte.rouletteWheel', { }, spinText: 'SPIN', colors: [], + minSpinMilliseconds: 4000, }, _options: { @@ -241,7 +242,7 @@ $.widget('javobyte.rouletteWheel', { this._options.rotating = true; this._options.spinAngleStart = Math.random() * 100 + 5 * Math.random() + 5 * Math.random() + 2 * Math.random(); this._options.spinTime = 0; - this._options.spinTimeTotal = Math.random() * 3000 + 4 * 1000 + 2 * Math.random(); + this._options.spinTimeTotal = Math.random() * 3000 + this.options.minSpinMilliseconds + 2 * Math.random(); this._rotate(); },