1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-11 09:50:27 +00:00

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

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() {