Skip to content

Commit

Permalink
Fix for angular-ui#279
Browse files Browse the repository at this point in the history
  • Loading branch information
jonricaurte committed Jul 2, 2013
1 parent e52e21f commit 58bca90
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
7 changes: 3 additions & 4 deletions build/ng-grid.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ng-grid JavaScript Library
* Authors: https://github.com/angular-ui/ng-grid/blob/master/README.md
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
* Compiled At: 07/01/2013 19:56
* Compiled At: 07/01/2013 20:11
***********************************************/
(function(window, $) {
'use strict';
Expand Down Expand Up @@ -296,8 +296,7 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService
for (var i = 0; i < cols.length; i++) {
var col = cols[i];
if (col.visible !== false) {
var colLeft = col.pinned ? grid.$viewport.scrollLeft() + sumWidth : sumWidth;
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + colLeft + "px; height: " + rowHeight + "px }" +
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + sumWidth + "px; height: " + rowHeight + "px }" +
"." + gridId + " .colt" + i + " { width: " + col.width + "px; }";
sumWidth += col.width;
}
Expand All @@ -313,8 +312,8 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService

grid.$styleSheet = $style;

$scope.adjustScrollLeft(grid.$viewport.scrollLeft());
if (digest) {
$scope.adjustScrollLeft(grid.$viewport.scrollLeft());
domUtilityService.digest($scope);
}
};
Expand Down
7 changes: 3 additions & 4 deletions build/ng-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ng-grid JavaScript Library
* Authors: https://github.com/angular-ui/ng-grid/blob/master/README.md
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
* Compiled At: 07/01/2013 19:56
* Compiled At: 07/01/2013 20:11
***********************************************/
(function(window, $) {
'use strict';
Expand Down Expand Up @@ -276,8 +276,7 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService
for (var i = 0; i < cols.length; i++) {
var col = cols[i];
if (col.visible !== false) {
var colLeft = col.pinned ? grid.$viewport.scrollLeft() + sumWidth : sumWidth;
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + colLeft + "px; height: " + rowHeight + "px }" +
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + sumWidth + "px; height: " + rowHeight + "px }" +
"." + gridId + " .colt" + i + " { width: " + col.width + "px; }";
sumWidth += col.width;
}
Expand All @@ -292,8 +291,8 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService
}

grid.$styleSheet = $style;
$scope.adjustScrollLeft(grid.$viewport.scrollLeft());
if (digest) {
$scope.adjustScrollLeft(grid.$viewport.scrollLeft());
domUtilityService.digest($scope);
}
};
Expand Down
4 changes: 2 additions & 2 deletions build/ng-grid.min.js

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions ng-grid-2.0.7.debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* ng-grid JavaScript Library
* Authors: https://github.com/angular-ui/ng-grid/blob/master/README.md
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
* Compiled At: 07/01/2013 19:56
* Compiled At: 07/01/2013 20:11
***********************************************/
(function(window, $) {
'use strict';
Expand Down Expand Up @@ -296,8 +296,7 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService
for (var i = 0; i < cols.length; i++) {
var col = cols[i];
if (col.visible !== false) {
var colLeft = col.pinned ? grid.$viewport.scrollLeft() + sumWidth : sumWidth;
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + colLeft + "px; height: " + rowHeight + "px }" +
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + sumWidth + "px; height: " + rowHeight + "px }" +
"." + gridId + " .colt" + i + " { width: " + col.width + "px; }";
sumWidth += col.width;
}
Expand All @@ -313,8 +312,8 @@ angular.module('ngGrid.services').factory('$domUtilityService',['$utilityService

grid.$styleSheet = $style;

$scope.adjustScrollLeft(grid.$viewport.scrollLeft());
if (digest) {
$scope.adjustScrollLeft(grid.$viewport.scrollLeft());
domUtilityService.digest($scope);
}
};
Expand Down
4 changes: 2 additions & 2 deletions ng-grid-2.0.7.min.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/services/DomUtilityService.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@
for (var i = 0; i < cols.length; i++) {
var col = cols[i];
if (col.visible !== false) {
var colLeft = col.pinned ? grid.$viewport.scrollLeft() + sumWidth : sumWidth;
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + colLeft + "px; height: " + rowHeight + "px }" +
css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + sumWidth + "px; height: " + rowHeight + "px }" +
"." + gridId + " .colt" + i + " { width: " + col.width + "px; }";
sumWidth += col.width;
}
Expand All @@ -106,8 +105,8 @@

grid.$styleSheet = $style;

$scope.adjustScrollLeft(grid.$viewport.scrollLeft());
if (digest) {
$scope.adjustScrollLeft(grid.$viewport.scrollLeft());
domUtilityService.digest($scope);
}
};
Expand Down

0 comments on commit 58bca90

Please sign in to comment.