Skip to content

Commit

Permalink
horizontal scroll bar in grid fix
Browse files Browse the repository at this point in the history
  • Loading branch information
siosTomBeckenhauer committed Jan 21, 2016
1 parent af33ad0 commit b1f9506
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build/ng-grid.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,17 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService

for (var i = 0; i < cols.length; i++) {
var col = cols[i];
if (col.visible !== false) {
if (col.visible !== false && i < cols.length-1) {
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + sumWidth + "px; height: " + rowHeight + "px }" +
"." + gridId + " .colt" + i + " { width: " + col.width + "px; }";
sumWidth += col.width;
}
// for removing horizontal scroll bar on grid during pin unpin
else if(col.visible !== false){
css += "." + gridId + " .col" + i + " { width: " + (col.width-1) + "px; left: " + sumWidth + "px; height: " + rowHeight + "px }" +
"." + gridId + " .colt" + i + " { width: " + (col.width-1) + "px; }";
sumWidth += col.width;
}
}
domUtilityService.setStyleText(grid, css);

Expand Down

0 comments on commit b1f9506

Please sign in to comment.