react-custom-scrollbars
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -155,9 +155,3 @@ 'use strict'; | ||
this.addListeners(); | ||
var _getSize = this.getSize(); | ||
var width = _getSize.width; | ||
var height = _getSize.height; | ||
this.setState({ width: width, height: height }, this.update); | ||
this.update(); | ||
}; | ||
@@ -229,9 +223,13 @@ | ||
Scrollbars.prototype.update = function update() { | ||
var _this = this; | ||
if (SCROLLBAR_WIDTH === 0) return; | ||
var size = this.getSize(); | ||
var sizeInnerPercentage = this.getInnerSizePercentage(); | ||
var position = this.getPosition(); | ||
this.setState(_extends({}, size, sizeInnerPercentage, position)); | ||
this.setState(size, function () { | ||
var sizeInnerPercentage = _this.getInnerSizePercentage(); | ||
var position = _this.getPosition(); | ||
_this.setState(_extends({}, sizeInnerPercentage, position)); | ||
}); | ||
}; | ||
@@ -310,8 +308,3 @@ | ||
Scrollbars.prototype.handleWindowResize = function handleWindowResize() { | ||
var _getSize2 = this.getSize(); | ||
var width = _getSize2.width; | ||
var height = _getSize2.height; | ||
this.setState({ width: width, height: height }, this.update); | ||
this.update(); | ||
}; | ||
@@ -318,0 +311,0 @@ |
{ | ||
"name": "react-custom-scrollbars", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "React scrollbars component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
833364
17986