Skip to content

Commit bb28b2f

Browse files
marc-khoury-kronosmportuga
authored andcommitted
fix(core): use allowFloatWidth property to allow float calculations for width
1 parent f4d3e22 commit bb28b2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/src/js/factories/GridRenderContainer.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ angular.module('ui.grid')
606606

607607
if (angular.isNumber(column.width)) {
608608
// pixel width, set to this value
609-
if(column.colDef.allowFloatWidth) {
609+
if (column.colDef.allowFloatWidth) {
610610
width = parseFloat(column.width);
611611
} else {
612612
width = parseInt(column.width, 10);
@@ -620,7 +620,7 @@ angular.module('ui.grid')
620620
// percentage width, set to percentage of the viewport
621621
// round down to int - some browsers don't play nice with float maxWidth
622622
var percentageIntegerValue = parseInt(column.width.replace(/%/g, ''), 10);
623-
if(column.colDef.allowFloatWidth) {
623+
if (column.colDef.allowFloatWidth) {
624624
width = parseFloat(percentageIntegerValue / 100 * availableWidth);
625625
} else {
626626
width = parseInt(percentageIntegerValue / 100 * availableWidth, 10);
@@ -657,7 +657,7 @@ angular.module('ui.grid')
657657
asterisksArray.forEach(function (column) {
658658
var width = parseInt(column.width.length * asteriskVal, 10);
659659

660-
if(column.colDef.allowFloatWidth) {
660+
if (column.colDef.allowFloatWidth) {
661661
width = parseFloat(column.width.length * asteriskVal);
662662
}
663663

0 commit comments

Comments
 (0)