Skip to content

Commit bc2c68a

Browse files
committed
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
1 parent 96625e2 commit bc2c68a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/core/factories/Grid.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1786,8 +1786,8 @@ angular.module('ui.grid')
17861786

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

1789-
container.adjustRows(container.prevScrollTop, null);
1790-
container.adjustColumns(container.prevScrollLeft, null);
1789+
container.adjustRows(null, container.prevScrolltopPercentage);
1790+
container.adjustColumns(null, container.prevScrollleftPercentage);
17911791
}
17921792
};
17931793

0 commit comments

Comments
 (0)