use of getTextRefence in isSelected

Instead of a particular implementation make use of the overall function
getTextReference to determine the current value.
Add a missing semicolon.
This commit is contained in:
cehmke 2015-05-10 13:26:00 +02:00
parent 42a3e31b1b
commit b8addaa520
1 changed files with 2 additions and 3 deletions

View File

@ -107,11 +107,10 @@ ButtonWidget.prototype.allowActionPropagation = function() {
ButtonWidget.prototype.getBoundingClientRect = function() {
return this.domNodes[0].getBoundingClientRect();
}
};
ButtonWidget.prototype.isSelected = function() {
var tiddler = this.wiki.getTiddler(this.set);
return tiddler ? tiddler.fields.text === this.setTo : this.defaultSetValue === this.setTo;
return this.wiki.getTextReference(this.set,"",this.getVariable("currentTiddler")) === this.setTo;
};
ButtonWidget.prototype.isPoppedUp = function() {