mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-11-16 11:54:27 +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:
1 parent
32dc09d8ac
commit
8564602256
42 files changed
+175
-183
No files matched your search
@@ -26,7 +26,7 @@ var EditWidget = function(renderer) {
|
||||
|
||||
EditWidget.prototype.generate = function() {
|
||||
// Get parameters from our attributes
|
||||
this.tiddlerTitle = this.renderer.getAttribute("tiddler",this.renderer.getContextTiddlerTitle());
|
||||
this.tiddlerTitle = this.renderer.getAttribute("tiddler",this.renderer.tiddlerTitle);
|
||||
this.fieldName = this.renderer.getAttribute("field","text");
|
||||
// Choose the editor to use
|
||||
// TODO: Tiddler field modules should be able to specify a field type from which the editor is derived
|
||||
|
||||
@@ -88,7 +88,7 @@ TextEditor.prototype.render = function() {
|
||||
this.editWidget.attributes.style = this.editWidget.attributes.style || "";
|
||||
this.editWidget.attributes.style += this.editWidget.renderer.parseTreeNode.attributes.style.value;
|
||||
}
|
||||
this.editWidget.children = this.editWidget.renderer.renderTree.createRenderers(this.editWidget.renderer.renderContext,[node]);
|
||||
this.editWidget.children = this.editWidget.renderer.renderTree.createRenderers(this.editWidget.renderer,[node]);
|
||||
this.editWidget.events = [
|
||||
{name: "focus", handlerObject: this},
|
||||
{name: "blur", handlerObject: this},
|
||||
|
||||
Reference in new issue
Block a user