Skip to content

Commit

Permalink
added the radix to parseInt()
Browse files Browse the repository at this point in the history
added the decimal radix (10) to the function calls of parseInt()
  • Loading branch information
bugwelle committed Jan 23, 2013
1 parent 214f9cd commit 9f26e42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/viewnavigator/viewnavigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ ViewNavigator.prototype.updateView = function( viewDescriptor ) {
var originalTopMargin = children.css( 'margin-top' );
children.attr( 'originalTopMargin', originalTopMargin );

var cssString = 'translate3d(0px, '+(parseInt( scrollY ) + parseInt( originalTopMargin )).toString()+'px, 0px)';
var cssString = 'translate3d(0px, '+(parseInt( scrollY, 10 ) + parseInt( originalTopMargin, 10 )).toString()+'px, 0px)';
children.css( '-webkit-transform', cssString );

// children.css( 'margin-top', (parseInt( scrollY ) + parseInt( originalTopMargin )).toString() + 'px' );
// children.css( 'margin-top', (parseInt( scrollY, 10 ) + parseInt( originalTopMargin, 10 )).toString() + 'px' );
}
}

Expand Down Expand Up @@ -309,7 +309,7 @@ ViewNavigator.prototype.resetScroller = function() {
}
self.scroller = new iScroll( id );
if ( currentViewDescriptor.maintainScrollPosition !== false && scrollY != undefined && scrollY != '' ) {
self.scroller.scrollTo( 0, parseInt( scrollY ) );
self.scroller.scrollTo( 0, parseInt( scrollY, 10 ) );
}
}, 10 );
//this.scroller = new iScroll( id );
Expand Down

0 comments on commit 9f26e42

Please sign in to comment.