@@ -606,7 +606,12 @@ angular.module('ui.grid')
606
606
607
607
if ( angular . isNumber ( column . width ) ) {
608
608
// pixel width, set to this value
609
- width = parseInt ( column . width , 10 ) ;
609
+ if ( column . colDef . allowFloatWidth ) {
610
+ width = parseFloat ( column . width ) ;
611
+ } else {
612
+ width = parseInt ( column . width , 10 ) ;
613
+ }
614
+
610
615
usedWidthSum = usedWidthSum + width ;
611
616
column . drawnWidth = width ;
612
617
@@ -615,7 +620,12 @@ angular.module('ui.grid')
615
620
// percentage width, set to percentage of the viewport
616
621
// round down to int - some browsers don't play nice with float maxWidth
617
622
var percentageIntegerValue = parseInt ( column . width . replace ( / % / g, '' ) , 10 ) ;
618
- width = parseInt ( percentageIntegerValue / 100 * availableWidth ) ;
623
+ if ( column . colDef . allowFloatWidth ) {
624
+ width = parseFloat ( percentageIntegerValue / 100 * availableWidth ) ;
625
+ } else {
626
+ width = parseInt ( percentageIntegerValue / 100 * availableWidth , 10 ) ;
627
+ }
628
+
619
629
620
630
if ( width > column . maxWidth ) {
621
631
width = column . maxWidth ;
@@ -647,6 +657,11 @@ angular.module('ui.grid')
647
657
asterisksArray . forEach ( function ( column ) {
648
658
var width = parseInt ( column . width . length * asteriskVal , 10 ) ;
649
659
660
+ if ( column . colDef . allowFloatWidth ) {
661
+ width = parseFloat ( column . width . length * asteriskVal ) ;
662
+ }
663
+
664
+
650
665
if ( width > column . maxWidth ) {
651
666
width = column . maxWidth ;
652
667
}
0 commit comments