Added reset button to resource cards
This commit is contained in:
@@ -133,6 +133,9 @@
|
||||
<div class="right clickable flex layout horizontal center">
|
||||
{{title}}
|
||||
</div>
|
||||
<div class="layout horizontal center">
|
||||
<paper-button class="resourceReset" disabled={{cantIncrement}}>Reset</paper-button>
|
||||
</div>
|
||||
</paper-material>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -129,6 +129,11 @@ Template.resource.helpers({
|
||||
});
|
||||
|
||||
Template.resource.events({
|
||||
"click .resourceReset": function(event){
|
||||
var modifier = {$set: {}};
|
||||
modifier.$set[this.name + ".adjustment"] = 0;
|
||||
Characters.update(this.char._id, modifier, {validate: false});
|
||||
},
|
||||
"click .resourceUp": function(event){
|
||||
var value = Characters.calculate.attributeValue(this.char._id, this.name);
|
||||
var base = Characters.calculate.attributeBase(this.char._id, this.name);
|
||||
|
||||
Reference in New Issue
Block a user