diff --git a/js/animations/animation.js b/js/animations/animation.js index 485f0a24..a6c76a1a 100644 --- a/js/animations/animation.js +++ b/js/animations/animation.js @@ -442,6 +442,7 @@ class Animation { } } propertiesDialog() { + let vue; let vue_data = { anim_time_update: this.anim_time_update, blend_weight: this.blend_weight, @@ -487,7 +488,8 @@ class Animation { ` ], onConfirm: form_data => { - dialog.hide() + dialog.hide(); + vue.$destroy(); if ( form_data.loop != this.loop || form_data.name != this.name @@ -510,12 +512,16 @@ class Animation { this.blend_weight = vue_data.blend_weight.trim().replace(/\n/g, ''); Undo.finishEdit('edit animation properties'); } + }, + onCancel() { + dialog.hide(); + vue.$destroy(); } }) dialog.show(); - new Vue({ + vue = new Vue({ el: 'dialog#animation_properties #animation_properties_vue', - components: {VuePrismEditor}, + data: vue_data }) } @@ -1105,7 +1111,7 @@ const Animator = { outlines.children.empty() Canvas.updateAllPositions() } - if (!Animation.selected && Animator.animations.length) { + if (Animator.animations.length) { Animator.animations[0].select() } Animator.preview() @@ -1282,7 +1288,7 @@ const Animator = { } } animation.calculateSnappingFromKeyframes(); - if (!Animation.selected) { + if (!Animation.selected && Animator.open) { animation.select() } new_animations.push(animation) @@ -1641,7 +1647,6 @@ Interface.definePanels(function() { }, component: { name: 'panel-placeholders', - components: {VuePrismEditor}, data() { return { text: '' }}, diff --git a/js/display_mode.js b/js/display_mode.js index 060bafc5..1251c8ef 100644 --- a/js/display_mode.js +++ b/js/display_mode.js @@ -1939,8 +1939,7 @@ Interface.definePanels(function() { head: Toolbars.display }, component: { - name: 'panel-keyframe', - components: {VuePrismEditor}, + name: 'panel-display', data() {return { axes: [0, 1, 2], slot: new DisplaySlot() diff --git a/js/interface/dialog.js b/js/interface/dialog.js index a5974f8e..efaee0ea 100644 --- a/js/interface/dialog.js +++ b/js/interface/dialog.js @@ -27,7 +27,7 @@ function buildForm(dialog) { bar.append(list) } if (data.type == 'password') { - bar.append(`
+ bar.append(`
`) input_element.attr('type', 'password') @@ -425,11 +425,4 @@ window.Dialog = class Dialog { } } -new Dialog({ - form: { - input: {type: 'text', label: 'Hi', value: 'text', condition(form) {}} - } -}) - - })() diff --git a/js/interface/menu.js b/js/interface/menu.js index 99561ed2..685224ab 100644 --- a/js/interface/menu.js +++ b/js/interface/menu.js @@ -270,6 +270,8 @@ class Menu { } else { if (!position && scope.type === 'bar_menu') { position = scope.label + } else if (position && position.parentElement.classList.contains('tool')) { + position = position.parentElement; } var offset_left = $(position).offset().left; var offset_top = $(position).offset().top + $(position).height(); diff --git a/js/preview/preview.js b/js/preview/preview.js index a8e1f349..4fbcd324 100644 --- a/js/preview/preview.js +++ b/js/preview/preview.js @@ -1276,10 +1276,6 @@ const Screencam = { var loop = setInterval(() => { frames++; - if (getProgress() >= 1) { - endRecording() - return; - } Canvas.withoutGizmos(function() { var img = new Image(); preview.render(); @@ -1288,8 +1284,11 @@ const Screencam = { gif.addFrame(img, {delay: interval}); } }) - Blockbench.setProgress(getProgress()); + if (getProgress() >= 1) { + endRecording() + return; + } }, interval)