From de444f475d5e2ba650d8d7e8bc54a5c86fba508b Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Mon, 1 Mar 2021 13:47:06 +0100 Subject: [PATCH] Fix animation saving issue --- css/panels.css | 1 - js/animations/animation.js | 6 ++++-- js/animations/timeline.js | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/css/panels.css b/css/panels.css index bc56b33..9885d5a 100644 --- a/css/panels.css +++ b/css/panels.css @@ -453,7 +453,6 @@ /*Animations*/ .panel#animations #animations_list { min-height: 126px; - max-height: 294px; padding-bottom: 12px; } .animation { diff --git a/js/animations/animation.js b/js/animations/animation.js index ba3540e..b64d59f 100644 --- a/js/animations/animation.js +++ b/js/animations/animation.js @@ -258,12 +258,14 @@ class Animation { anim_keys.forEach(key => { let key_index = file_keys.indexOf(key); - if (key_index < index) { + if (key_index == -1) { + //Skip + } else if (key_index < index) { file_keys.splice(key_index, 1); file_keys.splice(index, 0, key); changes = true; - } else if (key_index >= 0) { + } else { index = key_index; } }) diff --git a/js/animations/timeline.js b/js/animations/timeline.js index 34a6cfd..1e739ea 100644 --- a/js/animations/timeline.js +++ b/js/animations/timeline.js @@ -781,7 +781,6 @@ onVueSetup(function() { e2.clientY - e1.clientY, ] if (!is_setup) { - console.log(Math.pow(offset[0], 2) + Math.pow(offset[1], 2)) if (Math.pow(offset[0], 2) + Math.pow(offset[1], 2) > 40) { setup(); } else {