mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-30 13:29:56 +00:00
Merge pull request #1723 from cehmke/fix-buttonwidget-textreference-selected
Use of getTextRefence in ButtonWidget.isSelected
This commit is contained in:
commit
f0206283cf
@ -107,11 +107,10 @@ ButtonWidget.prototype.allowActionPropagation = function() {
|
|||||||
|
|
||||||
ButtonWidget.prototype.getBoundingClientRect = function() {
|
ButtonWidget.prototype.getBoundingClientRect = function() {
|
||||||
return this.domNodes[0].getBoundingClientRect();
|
return this.domNodes[0].getBoundingClientRect();
|
||||||
}
|
};
|
||||||
|
|
||||||
ButtonWidget.prototype.isSelected = function() {
|
ButtonWidget.prototype.isSelected = function() {
|
||||||
var tiddler = this.wiki.getTiddler(this.set);
|
return this.wiki.getTextReference(this.set,"",this.getVariable("currentTiddler")) === this.setTo;
|
||||||
return tiddler ? tiddler.fields.text === this.setTo : this.defaultSetValue === this.setTo;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ButtonWidget.prototype.isPoppedUp = function() {
|
ButtonWidget.prototype.isPoppedUp = function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user