1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 20:10:03 +00:00

Added support for nodes that are dependent on the current context tiddler

This commit is contained in:
Jeremy Ruston 2012-03-30 13:48:16 +01:00
parent 628963d838
commit 8f3fcda234

View File

@ -56,11 +56,15 @@ Dependencies.prototype.mergeDependencies = function(dep) {
/*
Determine if these dependencies are impacted by the specified array of changes
changes: Hashmap of {title: "created|modified|deleted"}
contextTiddlerTitle: The title of the current context tiddler
*/
Dependencies.prototype.hasChanged = function(changes) {
Dependencies.prototype.hasChanged = function(changes,contextTiddlerTitle) {
if(this.dependentAll) {
return true;
}
if(this.dependentOnContextTiddler && contextTiddlerTitle && changes.hasOwnProperty(contextTiddlerTitle)) {
return true;
}
for(var c in changes) {
if(this.tiddlers.hasOwnProperty(c)) {
return true;