mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-04-06 17:31:09 +08:00
Small interface fixes
This commit is contained in:
parent
2bc836d72c
commit
763b1396bf
@ -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 {
|
||||
</div>`
|
||||
],
|
||||
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: ''
|
||||
}},
|
||||
|
@ -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()
|
||||
|
@ -27,7 +27,7 @@ function buildForm(dialog) {
|
||||
bar.append(list)
|
||||
}
|
||||
if (data.type == 'password') {
|
||||
bar.append(`<div class="password_toggle" @click="setting.hidden = !setting.hidden;">
|
||||
bar.append(`<div class="password_toggle">
|
||||
<i class="fas fa-eye-slash"></i>
|
||||
</div>`)
|
||||
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) {}}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
})()
|
||||
|
@ -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();
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user