mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-21 01:13:37 +08:00
Disable fox display reference object in bedrock format
Fix display panel aligning to the bottom of sidebar
This commit is contained in:
parent
c3d111bbfb
commit
1cfd9a2e75
@ -111,7 +111,7 @@
|
||||
.panel.fixed_height {
|
||||
flex-grow: 0;
|
||||
}
|
||||
.panel.bottommost_panel {
|
||||
.panel.bottommost_panel:not(.topmost_panel) {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
|
@ -234,6 +234,7 @@ class refModel {
|
||||
this.name = tl('display.reference.'+id);
|
||||
this.id = id;
|
||||
this.icon = options.icon || id;
|
||||
this.condition = options.condition;
|
||||
this.initialized = false;
|
||||
this.pose_angles = {};
|
||||
|
||||
@ -1211,7 +1212,7 @@ window.displayReferenceObjects = {
|
||||
armor_stand: new refModel('armor_stand', {icon: 'icon-armor_stand'}),
|
||||
baby_zombie: new refModel('baby_zombie', {icon: 'icon-baby_zombie'}),
|
||||
armor_stand_small: new refModel('armor_stand_small', {icon: 'icon-armor_stand_small'}),
|
||||
fox: new refModel('fox', {icon: 'pets'}),
|
||||
fox: new refModel('fox', {icon: 'pets', condition: {formats: ['java_block']}}),
|
||||
monitor: new refModel('monitor', {icon: 'fa-asterisk'}),
|
||||
bow: new refModel('bow', {icon: 'icon-bow'}),
|
||||
crossbow: new refModel('crossbow', {icon: 'icon-crossbow'}),
|
||||
@ -1227,11 +1228,8 @@ window.displayReferenceObjects = {
|
||||
},
|
||||
active: '',
|
||||
bar: function(buttons) {
|
||||
$('#display_ref_bar').html('')
|
||||
if (buttons.length === 10000) {
|
||||
this.refmodels[buttons[0]].load()
|
||||
return;
|
||||
}
|
||||
buttons = buttons.filter(id => Condition(this.refmodels[id]));
|
||||
$('#display_ref_bar').html('');
|
||||
if (buttons.length < 2) {
|
||||
$('.reference_model_bar').css('visibility', 'hidden')
|
||||
} else {
|
||||
|
@ -679,6 +679,7 @@ class Panel extends EventSystem {
|
||||
this.node.style.width = this.width + 'px';
|
||||
this.node.style.height = this.height + 'px';
|
||||
this.node.classList.remove('bottommost_panel');
|
||||
this.node.classList.remove('topmost_panel');
|
||||
} else {
|
||||
this.node.style.width = this.node.style.height = this.node.style.left = this.node.style.top = null;
|
||||
}
|
||||
@ -722,6 +723,10 @@ class Panel extends EventSystem {
|
||||
this.node.parentElement?.childNodes.forEach(n => n.classList.remove('bottommost_panel'));
|
||||
this.node.classList.add('bottommost_panel');
|
||||
}
|
||||
if ((slot == 'right_bar' && Interface.getRightPanels()[0] == this) || (slot == 'left_bar' && Interface.getLeftPanels()[0] == this)) {
|
||||
this.node.parentElement?.childNodes.forEach(n => n.classList.remove('topmost_panel'));
|
||||
this.node.classList.add('topmost_panel');
|
||||
}
|
||||
|
||||
if (Panels[this.id] && this.onResize) this.onResize()
|
||||
} else {
|
||||
@ -802,8 +807,12 @@ function updateSidebarOrder() {
|
||||
let panel = Panels[panel_id];
|
||||
if (panel && panel.slot == bar) {
|
||||
panel.node.classList.remove('bottommost_panel');
|
||||
panel.node.classList.remove('topmost_panel');
|
||||
bar_node.append(panel.node);
|
||||
if (Condition(panel.condition)) {
|
||||
if (panel_count == 0) {
|
||||
panel.node.classList.add('topmost_panel');
|
||||
}
|
||||
panel_count++;
|
||||
last_panel = panel;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user