mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fix testcase widget refreshing
This commit is contained in:
parent
a91a6f602c
commit
03b6413c7a
@ -31,6 +31,10 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
this.parentDomNode = parent;
|
this.parentDomNode = parent;
|
||||||
this.computeAttributes();
|
this.computeAttributes();
|
||||||
this.execute();
|
this.execute();
|
||||||
|
// Create container DOM node
|
||||||
|
var domNode = this.document.createElement("div");
|
||||||
|
this.domNodes.push(domNode);
|
||||||
|
parent.insertBefore(domNode,nextSibling);
|
||||||
// Render the children into a hidden DOM node
|
// Render the children into a hidden DOM node
|
||||||
var parser = {
|
var parser = {
|
||||||
tree: [{
|
tree: [{
|
||||||
@ -77,10 +81,10 @@ TestCaseWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
this.setVariable("payloadTiddlers",jsonPayload);
|
this.setVariable("payloadTiddlers",jsonPayload);
|
||||||
// Render the page root template of the subwiki
|
// Render the page root template of the subwiki
|
||||||
var rootWidget = this.testcaseWiki.makeTranscludeWidget(this.testcaseTemplate,{document: this.document, parseAsInline: false, parentWidget: this});
|
var rootWidget = this.testcaseWiki.makeTranscludeWidget(this.testcaseTemplate,{document: this.document, parseAsInline: false, parentWidget: this});
|
||||||
rootWidget.render(parent,nextSibling);
|
rootWidget.render(domNode);
|
||||||
// Trap changes in the wiki and refresh the rendering
|
// Trap changes in the wiki and refresh the rendering
|
||||||
this.testcaseWiki.addEventListener("change",function(changes) {
|
this.testcaseWiki.addEventListener("change",function(changes) {
|
||||||
rootWidget.refresh(changes,parent,nextSibling);
|
rootWidget.refresh(changes,domNode);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user