1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-02 14:29:55 +00:00

Simplify the fill widget

We can rely on the default processing in the base class
This commit is contained in:
jeremy@jermolene.com 2022-07-19 10:02:09 +01:00
parent 7d90083d14
commit a2182255cc

View File

@ -24,33 +24,6 @@ Inherit from the base widget class
*/ */
FillWidget.prototype = Object.create(Widget.prototype); FillWidget.prototype = Object.create(Widget.prototype);
/*
Render this widget into the DOM
*/
FillWidget.prototype.render = function(parent,nextSibling) {
// Call the constructor
Widget.call(this);
this.parentDomNode = parent;
this.computeAttributes();
this.execute();
this.renderChildren(parent,nextSibling);
};
/*
Compute the internal state of the widget
*/
FillWidget.prototype.execute = function() {
// Construct the child widgets
this.makeChildWidgets();
};
/*
Refresh the widget by ensuring our attributes are up to date
*/
FillWidget.prototype.refresh = function(changedTiddlers) {
return this.refreshChildren(changedTiddlers);
};
exports.fill = FillWidget; exports.fill = FillWidget;
})(); })();