mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-10-03 22:51:43 +00:00
Moved render() and renderInDom() into widget base class
This commit is contained in:
@@ -100,26 +100,6 @@ exports.generateChildNodes = function() {
|
||||
}]);
|
||||
};
|
||||
|
||||
exports.render = function(type) {
|
||||
var output = [];
|
||||
$tw.utils.each(this.children,function(node) {
|
||||
if(node.render) {
|
||||
output.push(node.render(type));
|
||||
}
|
||||
});
|
||||
return output.join("");
|
||||
};
|
||||
|
||||
exports.renderInDom = function(parentElement) {
|
||||
this.parentElement = parentElement;
|
||||
// Render any child nodes
|
||||
$tw.utils.each(this.children,function(node) {
|
||||
if(node.renderInDom) {
|
||||
parentElement.appendChild(node.renderInDom());
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
exports.refreshInDom = function(changedAttributes,changedTiddlers) {
|
||||
// Set the class for missing tiddlers
|
||||
if(this.targetTitle) {
|
||||
|
||||
Reference in New Issue
Block a user