1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-07 01:08:06 +00:00

Added reveal macro

This commit is contained in:
Jeremy Ruston
2012-12-31 18:36:39 +00:00
parent 61eb585640
commit 8fdeefd7d1
8 changed files with 247 additions and 131 deletions

View File

@@ -92,6 +92,10 @@ WidgetRenderer.prototype.renderInDom = function() {
$tw.utils.addEventListeners(this.domNode,this.widget.getEventListeners());
}
}
// Call the postRenderInDom hook if the widget has one
if(this.widget.postRenderInDom) {
this.widget.postRenderInDom();
}
// Return the dom node
return this.domNode;
};
@@ -138,6 +142,22 @@ WidgetRenderer.prototype.checkContextRecursion = function(newRenderContext) {
return false;
};
WidgetRenderer.prototype.getContextScopeId = function() {
var guidBits = [],
context = this.renderContext;
while(context) {
$tw.utils.each(context,function(field,name) {
if(name !== "parentContext") {
guidBits.push(name + ":" + field + ";");
}
});
guidBits.push("-");
context = context.parentContext;
}
return $tw.utils.toBase64(guidBits.join(""));
};
exports.widget = WidgetRenderer
})();