Skip to content

Commit 9db4b89

Browse files
committed
fixed keyframe sorting bug
1 parent c9adde3 commit 9db4b89

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

example/codeKeyframes.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/codeKeyframes.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/js/app/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ function CodeKeyframes(args){
269269
}
270270

271271
this.sequence.sort(function(a,b){
272-
return a.time > b.time
272+
if( a.time > b.time ) return 1
273+
if( a.time < b.time ) return -1
274+
if( a.time == b.time ) return 0
273275
})
274276

275277
// update sequence cursor

0 commit comments

Comments
 (0)