Do NOT use maximum loop logic when steppign throuhg a sequence without a max loop
This commit is contained in:
parent
64b0244972
commit
a039e8f616
|
@ -50,7 +50,12 @@ sequence.setStop = function () {
|
||||||
sequence.stop = function () {
|
sequence.stop = function () {
|
||||||
sequence._state.active = false
|
sequence._state.active = false
|
||||||
sequence._state.count = 0
|
sequence._state.count = 0
|
||||||
|
sequence._state.arr = []
|
||||||
|
|
||||||
sequence._loop.count = 0
|
sequence._loop.count = 0
|
||||||
|
sequence._loop.max = 0
|
||||||
|
sequence._loop.arr = []
|
||||||
|
|
||||||
if (sequence._state.stop) sequence._state.stop()
|
if (sequence._state.stop) sequence._state.stop()
|
||||||
sequence._state.stop = null
|
sequence._state.stop = null
|
||||||
}
|
}
|
||||||
|
@ -79,7 +84,7 @@ sequence.step = function () {
|
||||||
sequence._state.count = 0
|
sequence._state.count = 0
|
||||||
sequence._loop.count++
|
sequence._loop.count++
|
||||||
}
|
}
|
||||||
if (sequence._loop.count > sequence._loop.max) {
|
if (sequence._loop.max > 0 &&sequence._loop.count > sequence._loop.max) {
|
||||||
return sequence.stop()
|
return sequence.stop()
|
||||||
}
|
}
|
||||||
return sequence._loop.arr[sequence._state.count](() => {
|
return sequence._loop.arr[sequence._state.count](() => {
|
||||||
|
|
Loading…
Reference in New Issue