mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +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:
parent
42a3e31b1b
commit
b8addaa520
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user