mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-06-14 04:24:08 +00:00
Fixes unnecessary refresh in Genesis widget (#8895)
* fix: handle attributes correctly in genesis widget * fix: handle attributes correctly in genesis widget
This commit is contained in:
parent
42c22acba6
commit
b1843837ea
@ -23,15 +23,21 @@ Inherit from the base widget class
|
|||||||
*/
|
*/
|
||||||
GenesisWidget.prototype = new Widget();
|
GenesisWidget.prototype = new Widget();
|
||||||
|
|
||||||
|
GenesisWidget.prototype.computeAttributes = function(options) {
|
||||||
|
options = options || Object.create(null);
|
||||||
|
options.filterFn = function(name) {
|
||||||
|
// Only compute our own attributes which start with a single dollar
|
||||||
|
return name.charAt(0) === "$" && name.charAt(1) !== "$";
|
||||||
|
}
|
||||||
|
return Widget.prototype.computeAttributes.call(this,options);
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Render this widget into the DOM
|
Render this widget into the DOM
|
||||||
*/
|
*/
|
||||||
GenesisWidget.prototype.render = function(parent,nextSibling) {
|
GenesisWidget.prototype.render = function(parent,nextSibling) {
|
||||||
this.parentDomNode = parent;
|
this.parentDomNode = parent;
|
||||||
this.computeAttributes({filterFn: function(name) {
|
this.computeAttributes();
|
||||||
// Only compute our own attributes which start with a single dollar
|
|
||||||
return name.charAt(0) === "$" && name.charAt(1) !== "$";
|
|
||||||
}});
|
|
||||||
this.execute();
|
this.execute();
|
||||||
this.renderChildren(parent,nextSibling);
|
this.renderChildren(parent,nextSibling);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user