Merge branch 'master' into csv-export-update-751

This commit is contained in:
Victor Woeltjen
2016-05-25 12:00:43 -07:00
35 changed files with 374 additions and 322 deletions

View File

@@ -97,6 +97,8 @@ define(
}
}
$scope.$watch("configuration", swimlanePopulator.configure);
// Recalculate swimlane state on changes
$scope.$watch("domainObject", swimlanePopulator.populate);

View File

@@ -43,8 +43,7 @@ define(
var swimlanes = [],
start = Number.POSITIVE_INFINITY,
end = Number.NEGATIVE_INFINITY,
colors = (configuration.colors || {}),
assigner = new TimelineColorAssigner(colors),
assigner,
lastDomainObject;
// Track extremes of start/end times
@@ -152,8 +151,15 @@ define(
recalculateSwimlanes(lastDomainObject);
}
function initialize() {
var colors = (configuration.colors || {});
assigner = new TimelineColorAssigner(colors);
configuration.colors = colors;
recalculateSwimlanes(lastDomainObject);
}
// Ensure colors are exposed in configuration
configuration.colors = colors;
initialize();
return {
/**
@@ -188,6 +194,15 @@ define(
*/
end: function () {
return end;
},
/**
* Pass a new configuration object (to retrieve and store
* swimlane configuration)
* @param newConfig
*/
configure: function (newConfig) {
configuration = newConfig;
initialize();
}
};
}