@@ -338,17 +338,15 @@ function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$r
338
338
339
339
// If it's a constant, it's either a percent or just a constant pixel number.
340
340
if ( isConstant ) {
341
- var intValue = parseInt ( parsedValue ( ) ) ;
342
-
343
341
// For percents, store the percent getter on .getValue()
344
342
if ( attrValue . indexOf ( '%' ) > - 1 ) {
345
- var decimalValue = intValue / 100 ;
343
+ var decimalValue = parseFloat ( parsedValue ( ) ) / 100 ;
346
344
dimensionData . getValue = dimensionData === heightData ?
347
345
function ( ) { return Math . floor ( decimalValue * scrollView . __clientHeight ) ; } :
348
346
function ( ) { return Math . floor ( decimalValue * scrollView . __clientWidth ) ; } ;
349
347
} else {
350
348
// For static constants, just store the static constant.
351
- dimensionData . value = intValue ;
349
+ dimensionData . value = parseInt ( parsedValue ( ) ) ;
352
350
}
353
351
354
352
} else {
@@ -357,14 +355,14 @@ function CollectionRepeatDirective($ionicCollectionManager, $parse, $window, $$r
357
355
function heightGetter ( scope , locals ) {
358
356
var result = parsedValue ( scope , locals ) ;
359
357
if ( result . charAt && result . charAt ( result . length - 1 ) === '%' ) {
360
- return Math . floor ( parseInt ( result ) / 100 * scrollView . __clientHeight ) ;
358
+ return Math . floor ( parseFloat ( result ) / 100 * scrollView . __clientHeight ) ;
361
359
}
362
360
return parseInt ( result ) ;
363
361
} :
364
362
function widthGetter ( scope , locals ) {
365
363
var result = parsedValue ( scope , locals ) ;
366
364
if ( result . charAt && result . charAt ( result . length - 1 ) === '%' ) {
367
- return Math . floor ( parseInt ( result ) / 100 * scrollView . __clientWidth ) ;
365
+ return Math . floor ( parseFloat ( result ) / 100 * scrollView . __clientWidth ) ;
368
366
}
369
367
return parseInt ( result ) ;
370
368
} ;
0 commit comments