Skip to content
Permalink
Browse files

fix(GridRenderContainer): Redraw with scroll %

Use previous scroll percentage to redraw, not the previous scrollLeft
value. The scrollLeft is too imprecise and is causing large canvases to
redraw out of place. To reproduce, you could scroll the "Horizontal
Scrolling" tutorial all the way right and then sort (or manually call
grid.refresh()). Changing redrawInPlace() to use the previous scroll
percentages fixes the issue.

Fixes #2357
  • Loading branch information
c0bra committed Dec 16, 2014
1 parent 96625e2 commit bc2c68aba48cdd5a3e840a589fb90cdba363618c
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/js/core/factories/Grid.js
@@ -1786,8 +1786,8 @@ angular.module('ui.grid')

// gridUtil.logDebug('redrawing container', i);

container.adjustRows(container.prevScrollTop, null);
container.adjustColumns(container.prevScrollLeft, null);
container.adjustRows(null, container.prevScrolltopPercentage);
container.adjustColumns(null, container.prevScrollleftPercentage);
}
};

0 comments on commit bc2c68a

Please sign in to comment.
You can’t perform that action at this time.