mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-07-19 18:32:50 +00:00
Fixed the reveal macro so that is marked dependentAll
This commit is contained in:
parent
5627e731b1
commit
16dc26b6e8
@ -100,30 +100,7 @@ exports.executeMacro = function() {
|
|||||||
return child;
|
return child;
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.refreshInDom = function(changes) {
|
exports.postRenderInDom = function() {
|
||||||
var needChildrenRefresh = true, // Avoid refreshing the children nodes if we don't need to
|
|
||||||
t;
|
|
||||||
// Re-read the open state
|
|
||||||
this.readState();
|
|
||||||
// Render the children if we're open and we don't have any children yet
|
|
||||||
if(this.isOpen && this.child.children.length === 0) {
|
|
||||||
// Install the children and execute them
|
|
||||||
this.child.children = this.content;
|
|
||||||
for(t=0; t<this.child.children.length; t++) {
|
|
||||||
this.child.children[t].execute(this.parents,this.tiddlerTitle);
|
|
||||||
this.child.children[t].renderInDom(this.child.domNode);
|
|
||||||
}
|
|
||||||
needChildrenRefresh = false; // Don't refresh the children if we've just created them
|
|
||||||
}
|
|
||||||
// Refresh the children
|
|
||||||
if(needChildrenRefresh) {
|
|
||||||
for(t=0; t<this.child.children.length; t++) {
|
|
||||||
this.child.children[t].refreshInDom(changes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Set the visibility of the children
|
|
||||||
this.child.domNode.style.display = this.isOpen ? "block" : "none";
|
|
||||||
// Position the content if required
|
|
||||||
switch(this.params.type) {
|
switch(this.params.type) {
|
||||||
case "popup":
|
case "popup":
|
||||||
if(this.isOpen) {
|
if(this.isOpen) {
|
||||||
@ -152,4 +129,31 @@ exports.refreshInDom = function(changes) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.refreshInDom = function(changes) {
|
||||||
|
var needChildrenRefresh = true, // Avoid refreshing the children nodes if we don't need to
|
||||||
|
t;
|
||||||
|
// Re-read the open state
|
||||||
|
this.readState();
|
||||||
|
// Render the children if we're open and we don't have any children yet
|
||||||
|
if(this.isOpen && this.child.children.length === 0) {
|
||||||
|
// Install the children and execute them
|
||||||
|
this.child.children = this.content;
|
||||||
|
for(t=0; t<this.child.children.length; t++) {
|
||||||
|
this.child.children[t].execute(this.parents,this.tiddlerTitle);
|
||||||
|
this.child.children[t].renderInDom(this.child.domNode);
|
||||||
|
}
|
||||||
|
needChildrenRefresh = false; // Don't refresh the children if we've just created them
|
||||||
|
}
|
||||||
|
// Refresh the children
|
||||||
|
if(needChildrenRefresh) {
|
||||||
|
for(t=0; t<this.child.children.length; t++) {
|
||||||
|
this.child.children[t].refreshInDom(changes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Set the visibility of the children
|
||||||
|
this.child.domNode.style.display = this.isOpen ? "block" : "none";
|
||||||
|
// Position the content if required
|
||||||
|
this.postRenderInDom();
|
||||||
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user