File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -67,8 +67,8 @@ export default class HorizontalScroll extends Component {
6767 && this . state . animValues === nextState . animValues ) {
6868 return false
6969 }
70-
71- if ( true
70+
71+ if ( true
7272 && this . props . children === nextProps . children
7373 && this . caniscroll ( ) === false ) {
7474 return false
@@ -77,19 +77,12 @@ export default class HorizontalScroll extends Component {
7777 return true
7878 }
7979
80- componentWillReceiveProps ( nextProps ) {
81- if ( this . props . children !== nextProps . children ) {
82- // Reset container offset
83- this . resetMin ( )
84- }
85- }
86-
8780 caniscroll ( ) {
8881 let el = DOM . findDOMNode ( this . hScrollParent )
8982 let rect = el . getBoundingClientRect ( )
9083 let scroller = el . firstElementChild
9184
92- return scroller . offsetLeft < rect . left
85+ return scroller . offsetLeft < rect . left
9386 || ( scroller . offsetLeft + scroller . offsetWidth > rect . width )
9487 }
9588
You can’t perform that action at this time.
0 commit comments