react-custom-scroll
Advanced tools
Comparing version 1.4.2 to 1.5.0
{ | ||
"name": "react-custom-scroll", | ||
"version": "1.4.2", | ||
"version": "1.5.0", | ||
"description": "An easily designable, cross browser (!!), custom scroll with ReactJS Animations and scroll rate **exactly** like native scroll", | ||
@@ -5,0 +5,0 @@ "main": "index", |
@@ -226,25 +226,25 @@ 'use strict'; | ||
return ( | ||
<div className={'custom-scroll ' + (this.state.onDrag ? 'scroll-handle-dragged' : '')} | ||
style={rootStyle}> | ||
<div className="outer-container" style={this.getOuterContainerStyle()}> | ||
{this.hasScroll ? (<div className="custom-scrollbar" onClick={this.onCustomScrollClick} key="scrollbar"> | ||
<div ref="scrollHandle" className="custom-scroll-handle" style={this.getScrollHandleStyle()} | ||
onMouseDown={this.onHandleMouseDown}> | ||
<div className="inner-handle"></div> | ||
</div> | ||
</div>) : null} | ||
<div ref="innerContainer" | ||
className={this.getInnerContainerClasses()} | ||
style={scrollStyles.innerContainer} | ||
onScroll={this.onScroll} | ||
onWheel={this.blockOuterScroll}> | ||
<div className="content-wrapper" | ||
ref="contentWrapper" | ||
style={scrollStyles.contentWrapper}> | ||
{this.props.children} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
/*eslint indent:0*/ | ||
return React.createElement('div', { | ||
className: 'custom-scroll ' + (this.state.onDrag ? 'scroll-handle-dragged' : ''), | ||
style: rootStyle | ||
}, React.createElement('div', { | ||
className: 'outer-container', style: this.getOuterContainerStyle() | ||
}, this.hasScroll ? React.createElement('div', { | ||
className: 'custom-scrollbar', onClick: this.onCustomScrollClick, key: 'scrollbar' | ||
}, React.createElement('div', { | ||
ref: 'scrollHandle', className: 'custom-scroll-handle', style: this.getScrollHandleStyle(), | ||
onMouseDown: this.onHandleMouseDown | ||
}, React.createElement('div', {className: 'inner-handle'}))) : null, | ||
React.createElement('div', { | ||
ref: 'innerContainer', | ||
className: this.getInnerContainerClasses(), | ||
style: scrollStyles.innerContainer, | ||
onScroll: this.onScroll, | ||
onWheel: this.blockOuterScroll | ||
}, React.createElement('div', { | ||
className: 'content-wrapper', | ||
ref: 'contentWrapper', | ||
style: scrollStyles.contentWrapper | ||
}, this.props.children))) | ||
); | ||
@@ -251,0 +251,0 @@ } |
94177