mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
Fix issue with plugin panels not initializing
This commit is contained in:
parent
775c2a84e4
commit
f670286850
@ -23,6 +23,7 @@ class Panel extends EventSystem {
|
|||||||
this.toolbars = [];
|
this.toolbars = [];
|
||||||
|
|
||||||
if (!Interface.data.panels[this.id]) Interface.data.panels[this.id] = {};
|
if (!Interface.data.panels[this.id]) Interface.data.panels[this.id] = {};
|
||||||
|
if (!Interface.getModeData().panels[this.id]) Interface.getModeData().panels[this.id] = {};
|
||||||
this.position_data = Interface.getModeData().panels[this.id];
|
this.position_data = Interface.getModeData().panels[this.id];
|
||||||
let defaultp = this.default_position = data.default_position || 0;
|
let defaultp = this.default_position = data.default_position || 0;
|
||||||
if (defaultp && defaultp.slot) this.previous_slot = defaultp.slot;
|
if (defaultp && defaultp.slot) this.previous_slot = defaultp.slot;
|
||||||
|
Loading…
Reference in New Issue
Block a user