mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-03 12:16:50 +00:00
Refactor rendertree to simplify context handling
Get rid of the separate renderContext stack and instead have a parent pointer on renderer nodes. This lets us walk back up the render tree to resolve context references
This commit is contained in:
@@ -25,7 +25,7 @@ InfoWidget.types = {
|
||||
|
||||
InfoWidget.prototype.generate = function() {
|
||||
// Get attributes
|
||||
this.tiddlerTitle = this.renderer.getAttribute("tiddler",this.renderer.getContextTiddlerTitle());
|
||||
this.tiddlerTitle = this.renderer.getAttribute("tiddler",this.tiddlerTitle);
|
||||
this.type = this.renderer.getAttribute("type","changecount");
|
||||
// Get the appropriate value for the current tiddler
|
||||
var value = "",
|
||||
@@ -39,7 +39,7 @@ InfoWidget.prototype.generate = function() {
|
||||
// Set the element
|
||||
this.tag = "span";
|
||||
this.attributes = {};
|
||||
this.children = this.renderer.renderTree.createRenderers(this.renderer.renderContext,[{
|
||||
this.children = this.renderer.renderTree.createRenderers(this.renderer,[{
|
||||
type: "text",
|
||||
text: value
|
||||
}]);
|
||||
|
||||
Reference in New Issue
Block a user