1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-12 21:43:01 +00:00

Medium-sized refactoring of macro architecture

Now event handlers are attached to element nodes, not to macro nodes.
This commit is contained in:
Jeremy Ruston
2012-06-14 17:15:38 +01:00
parent 79530dea49
commit 52f59a4eb4
13 changed files with 104 additions and 109 deletions

View File

@@ -40,12 +40,6 @@ exports.executeMacro = function() {
return child;
};
exports.addEventHandlers = function() {
if(this.editor.addEventHandlers) {
this.editor.addEventHandlers();
}
};
exports.postRenderInDom = function() {
if(this.editor.postRenderInDom) {
this.editor.postRenderInDom();
@@ -66,8 +60,6 @@ exports.refreshInDom = function(changes) {
this.execute(this.parents,this.tiddlerTitle);
// Render to the DOM
this.child.renderInDom(parent,nextSibling);
this.domNode = this.child.domNode;
this.addEventHandlers();
}
} else {
// Refresh any children