@beisen/beisen-scroll-bar
Advanced tools
Comparing version 0.0.1-56 to 0.0.1-57
@@ -57,5 +57,5 @@ 'use strict'; | ||
realHeight: 0, | ||
containerHeight: parseInt(props.style.height.split('px')[0]) || 0, | ||
containerHeight: props.style.height ? parseInt(props.style.height.split('px')[0]) : 0, | ||
realWidth: 0, | ||
containerWidth: parseInt(props.style.width.split('px')[0]) || 0 | ||
containerWidth: props.style.width ? parseInt(props.style.width.split('px')[0]) : 0 | ||
}; | ||
@@ -158,3 +158,3 @@ | ||
realSize: this.state.realHeight, | ||
containerSize: parseInt(this.props.style.height.split('px')[0]) || this.state.containerHeight, | ||
containerSize: this.props.style.height ? parseInt(this.props.style.height.split('px')[0]) : this.state.containerHeight, | ||
position: this.state.topPosition, | ||
@@ -172,3 +172,3 @@ onMove: this.handleScrollbarMove.bind(this), | ||
realSize: this.state.realWidth, | ||
containerSize: parseInt(this.props.style.width.split('px')[0]) || this.state.containerWidth, | ||
containerSize: this.props.style.width ? parseInt(this.props.style.width.split('px')[0]) : this.state.containerWidth, | ||
position: this.state.leftPosition, | ||
@@ -175,0 +175,0 @@ onMove: this.handleScrollbarMove.bind(this), |
{ | ||
"name": "@beisen/beisen-scroll-bar", | ||
"version": "0.0.1-56", | ||
"version": "0.0.1-57", | ||
"description": "beisen-scroll-bar", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -22,5 +22,5 @@ import React from 'react'; | ||
realHeight: 0, | ||
containerHeight: parseInt(props.style.height.split('px')[0])||0, | ||
containerHeight: props.style.height ? parseInt(props.style.height.split('px')[0]):0, | ||
realWidth: 0, | ||
containerWidth: parseInt(props.style.width.split('px')[0])||0 | ||
containerWidth: props.style.width ? parseInt(props.style.width.split('px')[0]):0 | ||
}; | ||
@@ -107,3 +107,3 @@ | ||
realSize={this.state.realHeight} | ||
containerSize={parseInt(this.props.style.height.split('px')[0]) || this.state.containerHeight} | ||
containerSize={this.props.style.height ? parseInt(this.props.style.height.split('px')[0]) : this.state.containerHeight} | ||
position={this.state.topPosition} | ||
@@ -124,3 +124,3 @@ onMove={this.handleScrollbarMove.bind(this)} | ||
realSize={this.state.realWidth} | ||
containerSize={parseInt(this.props.style.width.split('px')[0]) ||this.state.containerWidth} | ||
containerSize={this.props.style.width ? parseInt(this.props.style.width.split('px')[0]) : this.state.containerWidth} | ||
position={this.state.leftPosition} | ||
@@ -127,0 +127,0 @@ onMove={this.handleScrollbarMove.bind(this)} |
Sorry, the diff of this file is too big to display
1612208