mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-06 22:20:02 +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.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
|
||||
*/
|
||||
GenesisWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes({filterFn: function(name) {
|
||||
// Only compute our own attributes which start with a single dollar
|
||||
return name.charAt(0) === "$" && name.charAt(1) !== "$";
|
||||
}});
|
||||
this.computeAttributes();
|
||||
this.execute();
|
||||
this.renderChildren(parent,nextSibling);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user