Fixed hit dice dialog and arrow positions.

This commit is contained in:
Stefan Zermatten
2015-04-24 12:15:32 +02:00
parent c1222ad51d
commit 40500517af
2 changed files with 17 additions and 8 deletions

View File

@@ -1,7 +1,11 @@
<template name="hitDice">
{{#if char.attributeBase name}}
<paper-shadow class="card container" hero-id="main" {{detailHero}} layout horizontal>
<div class="containerLeft green">
{{#if ../attributeBase name}}
<paper-shadow class="card container" hero-id="main" {{detailHero name ../_id}} layout horizontal>
<div class="containerLeft green" layout horizontal hero-id="toolbar" {{detailHero name ../_id}}>
<div class="resourceButtons">
<paper-icon-button class="resourceUp" icon="arrow-drop-up" disabled={{cantIncrement}}></paper-icon-button>
<paper-icon-button class="resourceDown" icon="arrow-drop-down" disabled={{cantDecrement}}></paper-icon-button>
</div>
<div class="resourceValue" layout vertical center>
<div>
{{../attributeValue name}}
@@ -10,12 +14,8 @@
d{{diceNum}} {{../abilityMod "constitution"}}
</div>
</div>
<div class="resourceButtons">
<paper-icon-button class="resourceUp" icon="arrow-drop-up" disabled={{cantIncrement}}></paper-icon-button>
<paper-icon-button class="resourceDown" icon="arrow-drop-down" disabled={{cantDecrement}}></paper-icon-button>
</div>
</div>
<div class="containerRight" flex relative horizontal layout center>
<div class="containerRight clickable" flex relative horizontal layout center>
Hit Dice
<paper-ripple fit></paper-ripple>
</div>

View File

@@ -25,4 +25,13 @@ Template.hitDice.events({
Characters.update(this.char._id, modifier, {validate: false});
}
},
"tap .containerRight": function() {
var charId = Template.parentData()._id;
var title = "d" + this.diceNum + " Hit Dice";
GlobalUI.setDetail({
template: "attributeDialog",
data: {name: title, statName: this.name, charId: charId},
heroId: charId + this.name,
});
},
});