mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-23 15:36:52 +00:00
Fixed transclude widget to only refresh when the template changes
Not when the tiddler being viewed changes; any such changes will be picked up by embedded view widgets.
This commit is contained in:
parent
df59dee188
commit
e024440ca8
@ -128,7 +128,7 @@ TranscludeWidget.prototype.refreshInDom = function(changedAttributes,changedTidd
|
|||||||
$tw.utils.toggleClass(this.renderer.domNode,"tw-tiddler-missing",!this.renderer.renderTree.wiki.tiddlerExists(this.targetTitle));
|
$tw.utils.toggleClass(this.renderer.domNode,"tw-tiddler-missing",!this.renderer.renderTree.wiki.tiddlerExists(this.targetTitle));
|
||||||
}
|
}
|
||||||
// Check if any of our attributes have changed, or if a tiddler we're interested in has changed
|
// Check if any of our attributes have changed, or if a tiddler we're interested in has changed
|
||||||
if(changedAttributes.target || changedAttributes.template || (this.targetTitle && changedTiddlers[this.targetTitle]) || (this.templateTitle && changedTiddlers[this.templateTitle])) {
|
if(changedAttributes.target || changedAttributes.template || (this.templateTitle && changedTiddlers[this.templateTitle])) {
|
||||||
// Regenerate and rerender the widget and replace the existing DOM node
|
// Regenerate and rerender the widget and replace the existing DOM node
|
||||||
this.generate();
|
this.generate();
|
||||||
var oldDomNode = this.renderer.domNode,
|
var oldDomNode = this.renderer.domNode,
|
||||||
|
Loading…
Reference in New Issue
Block a user