Skip to content

Commit

Permalink
fix(GridRenderContainer): Redraw with scroll %
Browse files Browse the repository at this point in the history
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 bc2c68a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/core/factories/Grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down

0 comments on commit bc2c68a

Please sign in to comment.