mirror of
https://github.com/IvarK/AntimatterDimensionsSourceCode.git
synced 2025-02-18 00:20:13 +00:00
Fix perk tree not working after switching themes
This commit is contained in:
parent
b0450435a2
commit
87cdb43541
@ -17,7 +17,8 @@ Vue.component("select-theme", {
|
||||
},
|
||||
setTheme(theme) {
|
||||
theme.set();
|
||||
PerkNetwork.makeNetwork();
|
||||
PerkNetwork.forceNetworkRemake();
|
||||
PerkNetwork.initializeIfNeeded();
|
||||
}
|
||||
},
|
||||
template: `
|
||||
|
@ -145,6 +145,9 @@ const PerkNetwork = {
|
||||
const network = new vis.Network(container, nodeData, nodeOptions);
|
||||
this.network = network;
|
||||
},
|
||||
forceNetworkRemake() {
|
||||
this.container = undefined;
|
||||
},
|
||||
resetPosition() {
|
||||
this.network.moveTo({ position: { x: -600, y: -300 }, scale: 0.8, offset: { x: 0, y: 0 } });
|
||||
},
|
||||
|
@ -22,7 +22,7 @@ Vue.component("pp-label", {
|
||||
<div class="c-perk-tab__header">
|
||||
You have <span class="c-perk-tab__perk-points">{{ format(pp, 2, 0) }}</span> {{ "Perk Point" | pluralize(pp) }}.
|
||||
<br>
|
||||
Perks choices are permanent and cannot be respecced.
|
||||
Perk choices are permanent and cannot be respecced.
|
||||
<br>
|
||||
<primary-button-on-off
|
||||
v-model="fixedLoadPos"
|
||||
|
@ -58,7 +58,8 @@ Theme.current = function() {
|
||||
Theme.set = function(name) {
|
||||
const theme = Themes.find(name);
|
||||
theme.set();
|
||||
PerkNetwork.makeNetwork();
|
||||
PerkNetwork.forceNetworkRemake();
|
||||
PerkNetwork.initializeIfNeeded();
|
||||
return theme;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user