Merge pull request #1016 from opf/feature/ui-component-table-widgets-merged-timeline-chart-group-expansion-fixes

Fix timeline chart redrawing when group element expansions are toggled
pull/1038/head
manwithtwowatches 11 years ago
commit d16da20736
  1. 8
      app/assets/javascripts/angular/models/timelines/mixins/ui.js

@ -437,6 +437,7 @@ angular.module('openproject.timelines.models')
$timeout(function() { $timeout(function() {
// rebuild content // rebuild content
timeline.bustVerticalOffsetCache(tree);
timeline.rebuildBackground(tree, width, height); timeline.rebuildBackground(tree, width, height);
chart.css({'display': 'block'}); chart.css({'display': 'block'});
timeline.rebuildForeground(tree); timeline.rebuildForeground(tree);
@ -603,6 +604,13 @@ angular.module('openproject.timelines.models')
this.previousRelativeVerticalBottomOffsetParameter = offset; this.previousRelativeVerticalBottomOffsetParameter = offset;
return result; return result;
}, },
bustVerticalOffsetCache: function(tree) {
tree.iterateWithChildren(function(node) {
var currentElement = node.getDOMElement();
currentElement.removeAttr("data-vertical-offset");
currentElement.removeAttr("data-vertical-bottom-offset");
});
},
rebuildForeground: function(tree) { rebuildForeground: function(tree) {
var timeline = this; var timeline = this;
var previousGrouping = -1; var previousGrouping = -1;

Loading…
Cancel
Save