Skip to content

Commit 09a159a

Browse files
committed
stop delay
1 parent f99fef3 commit 09a159a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jquery.slotmachine.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ class SlotMachine {
570570
break;
571571
case 2:
572572
delay /= 0.75;
573-
this._transition = 'ease-out';
573+
this._transition = 'linear';
574574
this._animationFX = FX_SLOW;
575575
break;
576576
case 3:
@@ -611,7 +611,7 @@ class SlotMachine {
611611
this.delay = delay;
612612
this._animate(this.direction.to);
613613
this.raf(function cb () {
614-
if (!this.stopping) {
614+
if (!this.stopping && this.running) {
615615
this.resetPosition(this.direction.first);
616616

617617
if (spins - 1 <= 0) {
@@ -661,7 +661,7 @@ class SlotMachine {
661661
this.active = this.futureActive;
662662

663663
// Perform animation
664-
const delay = this.getDelayFromSpins(1) * 2;
664+
const delay = this.getDelayFromSpins(1) * this.active / (this.$tiles.length - 1);
665665
this.delay = delay;
666666
this._animationFX = FX_STOP;
667667
this._animate(this.getTileOffset(this.active));

0 commit comments

Comments
 (0)