Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
1 changed files with 6 additions and 1 deletions
Showing only changes of commit a039e8f616 - Show all commits

View File

@ -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](() => {