From b6a279f80b38d73fdfac8f233403ff8fb627bbfb Mon Sep 17 00:00:00 2001 From: liteng <930372551@qq.com> Date: Sat, 12 Jan 2019 13:34:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=B1=82=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ShadowEditor.Web/src/editor/bottom/TimePanel.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ShadowEditor.Web/src/editor/bottom/TimePanel.js b/ShadowEditor.Web/src/editor/bottom/TimePanel.js index a9f4b728..0591a55a 100644 --- a/ShadowEditor.Web/src/editor/bottom/TimePanel.js +++ b/ShadowEditor.Web/src/editor/bottom/TimePanel.js @@ -277,14 +277,19 @@ TimePanel.prototype.onRemoveLayer = function () { }); if (uuids.length === 0) { - UI.msg('请勾选需要删除的组!'); + UI.msg('请勾选需要删除的层!'); return; } - UI.confirm('询问', '删除组会删除组上的所有动画。是否删除?', (event, btn) => { + var animations = this.app.editor.animations; + + UI.confirm('询问', '删除层会删除层上的所有动画。是否删除?', (event, btn) => { if (btn === 'ok') { uuids.forEach(n => { - this.app.editor.animation.removeByUUID(n); + var index = animations.findIndex(m => m.uuid === n); + if (index > -1) { + animations.splice(index, 1); + } }); this.updateUI(); }