diff --git a/js/animations/animation.js b/js/animations/animation.js index d5295138..cfb826b7 100644 --- a/js/animations/animation.js +++ b/js/animations/animation.js @@ -1215,8 +1215,11 @@ const Animator = { outlines.children.empty() Canvas.updateAllPositions() } - if (Animator.animations.length) { - Animator.animations[0].select() + if (Animation.all.length && !Animation.all.includes(Animation.selected)) { + Animation.all[0].select(); + } + if (Group.selected) { + Group.selected.select(); } Animator.preview() }, diff --git a/js/io/codec.js b/js/io/codec.js index 5885baac..3b214e0b 100644 --- a/js/io/codec.js +++ b/js/io/codec.js @@ -114,6 +114,11 @@ class Codec { } this.events[event_name].safePush(cb) } + removeListener(event_name, cb) { + if (this.events[event_name]) { + this.events[event_name].remove(cb); + } + } //Delete delete() { delete Codecs[this.id];