mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-19 16:24:51 +00:00
Minor cleanup and comment improvements
This commit is contained in:
parent
be44fb4ad2
commit
fb9ea4c202
@ -434,7 +434,7 @@ WikiStore.prototype.refreshDomNode = function(node,changes,renderer,tiddler) {
|
|||||||
renderStep = node.getAttribute ? node.getAttribute("data-tw-render-step") : null;
|
renderStep = node.getAttribute ? node.getAttribute("data-tw-render-step") : null;
|
||||||
// Is this node the rendering of a tiddler?
|
// Is this node the rendering of a tiddler?
|
||||||
if(renderTiddler !== null) {
|
if(renderTiddler !== null) {
|
||||||
// Rerender the content of the node if the tiddler being rendered has changed
|
// Rerender the content of the node if the tiddler being rendered or its template has changed
|
||||||
if(changes.hasOwnProperty(renderTiddler) || (renderTemplate && changes.hasOwnProperty(renderTemplate))) {
|
if(changes.hasOwnProperty(renderTiddler) || (renderTemplate && changes.hasOwnProperty(renderTemplate))) {
|
||||||
this.renderTiddlerInNode(node,renderTiddler,renderTemplate,{noWrap: true});
|
this.renderTiddlerInNode(node,renderTiddler,renderTemplate,{noWrap: true});
|
||||||
} else {
|
} else {
|
||||||
@ -473,7 +473,7 @@ WikiStore.prototype.hasDependencyChanged = function(dependencies,changes) {
|
|||||||
for(var rel in dependencies) {
|
for(var rel in dependencies) {
|
||||||
if(rel !== "dependentAll") {
|
if(rel !== "dependentAll") {
|
||||||
for(var t in dependencies[rel]) {
|
for(var t in dependencies[rel]) {
|
||||||
if(t in changes) {
|
if(changes.hasOwnProperty(t)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ var HTML = require("./HTML.js").HTML,
|
|||||||
utils = require("./Utils.js");
|
utils = require("./Utils.js");
|
||||||
|
|
||||||
var WikiTextRenderer = function() {
|
var WikiTextRenderer = function() {
|
||||||
this.renderSteps = []; // Array of {step: n, dependencies: {},handler: function(tiddler,renderer,store,utils) {}}
|
this.renderSteps = []; // Array of {step: n, renderType: "main"|"macro", dependencies: {},handler: function(tiddler,renderer,store,utils) {}}
|
||||||
};
|
};
|
||||||
|
|
||||||
WikiTextRenderer.prototype.addRenderStep = function(renderStep) {
|
WikiTextRenderer.prototype.addRenderStep = function(renderStep) {
|
||||||
|
Loading…
Reference in New Issue
Block a user