Skip to content

Commit

Permalink
Another follow-up fix to mleibman@98a503f - fixed an issue with empty…
Browse files Browse the repository at this point in the history
… grid display when forceFitColumns=true.
  • Loading branch information
mleibman authored and Michael Leibman committed Jan 23, 2012
1 parent d24463b commit ff1e7cf
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ if (typeof Slick === "undefined") {
createColumnHeaders();
setupColumnSort();
createCssRules();
resizeAndRender();
resizeCanvas();
bindAncestorScrollEvents();

$container
.on("resize.slickgrid", resizeAndRender);
.on("resize.slickgrid", resizeCanvas);
$viewport
.on("scroll.slickgrid", handleScroll);
$headerScroller
Expand Down Expand Up @@ -975,7 +975,7 @@ if (typeof Slick === "undefined") {
createColumnHeaders();
removeCssRules();
createCssRules();
resizeAndRender();
resizeCanvas();
applyColumnWidths();
handleScroll();
}
Expand Down Expand Up @@ -1276,17 +1276,12 @@ if (typeof Slick === "undefined") {
viewportW = parseFloat($.css($container[0], "width", true));
$viewport.height(viewportH);

updateRowCount();
render();
}

function resizeAndRender() {
if (options.forceFitColumns) {
autosizeColumns();
render();
} else {
resizeCanvas();
}

updateRowCount();
render();
}

function updateRowCount() {
Expand Down

0 comments on commit ff1e7cf

Please sign in to comment.