mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 16:13:55 +00:00
Merge pull request #31 from thepaperpilot/fix-empty-tooltips
Fixed tooltip showing 'false' when tmp[layer].tooltip === ''
This commit is contained in:
commit
a80184ee0a
1 changed files with 3 additions and 2 deletions
|
@ -14,7 +14,7 @@ var systemComponents = {
|
||||||
'tree-node': {
|
'tree-node': {
|
||||||
props: ['layer', 'abb', 'size'],
|
props: ['layer', 'abb', 'size'],
|
||||||
template: `
|
template: `
|
||||||
<button v-if="nodeShown(layer)"
|
<button v-if="nodeShown(layer)"
|
||||||
v-bind:id="layer"
|
v-bind:id="layer"
|
||||||
v-on:click="function() {
|
v-on:click="function() {
|
||||||
if (shiftDown) player[layer].forceTooltip = !player[layer].forceTooltip
|
if (shiftDown) player[layer].forceTooltip = !player[layer].forceTooltip
|
||||||
|
@ -40,7 +40,8 @@ var systemComponents = {
|
||||||
v-bind:style="tmp[layer].computedNodeStyle">
|
v-bind:style="tmp[layer].computedNodeStyle">
|
||||||
<span v-html="(abb !== '' && tmp[layer].image === undefined) ? abb : ' '"></span>
|
<span v-html="(abb !== '' && tmp[layer].image === undefined) ? abb : ' '"></span>
|
||||||
<tooltip
|
<tooltip
|
||||||
:text="(tmp[layer].tooltip == '') ? false : (tmp[layer].isLayer) ? (
|
v-if="tmp[layer].tooltip != ''"
|
||||||
|
:text="(tmp[layer].isLayer) ? (
|
||||||
player[layer].unlocked ? (tmp[layer].tooltip ? tmp[layer].tooltip : formatWhole(player[layer].points) + ' ' + tmp[layer].resource)
|
player[layer].unlocked ? (tmp[layer].tooltip ? tmp[layer].tooltip : formatWhole(player[layer].points) + ' ' + tmp[layer].resource)
|
||||||
: (tmp[layer].tooltipLocked ? tmp[layer].tooltipLocked : 'Reach ' + formatWhole(tmp[layer].requires) + ' ' + tmp[layer].baseResource + ' to unlock (You have ' + formatWhole(tmp[layer].baseAmount) + ' ' + tmp[layer].baseResource + ')')
|
: (tmp[layer].tooltipLocked ? tmp[layer].tooltipLocked : 'Reach ' + formatWhole(tmp[layer].requires) + ' ' + tmp[layer].baseResource + ' to unlock (You have ' + formatWhole(tmp[layer].baseAmount) + ' ' + tmp[layer].baseResource + ')')
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue