File tree Expand file tree Collapse file tree 6 files changed +373
-376
lines changed Expand file tree Collapse file tree 6 files changed +373
-376
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom' ;
33import { ParallaxExample } from 'components' ;
4- import { ParallaxScroller } from 'react-scroll-parallax' ;
4+ import { ParallaxController } from 'react-scroll-parallax' ;
55
6- ParallaxScroller . init ( ) ;
6+ ParallaxController . init ( ) ;
77
88const root = document . getElementById ( 'root' ) ;
99
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import ReactDOM from 'react-dom' ;
33import { ParallaxTest } from 'components' ;
4- import { ParallaxScroller } from 'react-scroll-parallax' ;
4+ import { ParallaxController } from 'react-scroll-parallax' ;
55
6- ParallaxScroller . init ( ) ;
6+ ParallaxController . init ( ) ;
77
88const root = document . getElementById ( 'root' ) ;
99
Original file line number Diff line number Diff line change @@ -28,11 +28,11 @@ export default class Parallax extends Component {
2828
2929 componentDidMount ( ) {
3030 // add this Parallax element to the global listener
31- if ( typeof ParallaxScrollListener === 'undefined' ) {
32- throw new Error ( 'Must initialize the ParallaxScroller before adding React Parallax components.' ) ;
31+ if ( typeof ParallaxController === 'undefined' ) {
32+ throw new Error ( 'Must initialize the ParallaxController before adding React Parallax components.' ) ;
3333 }
3434 // create a new parallax element and save the reference
35- this . element = ParallaxScrollListener . createElement ( {
35+ this . element = ParallaxController . createElement ( {
3636 elInner : this . _inner ,
3737 elOuter : this . _outer ,
3838 props : this . props ,
@@ -42,16 +42,16 @@ export default class Parallax extends Component {
4242 componentWillReceiveProps ( nextProps ) {
4343 // updates the elements props when changed
4444 if ( this . props !== nextProps ) {
45- ParallaxScrollListener . updateElement ( this . element , { props : nextProps } ) ;
45+ ParallaxController . updateElement ( this . element , { props : nextProps } ) ;
4646 }
4747 // resets element styles when disabled
4848 if ( this . props . disabled !== nextProps . disabled && nextProps . disabled ) {
49- ParallaxScrollListener . resetElementStyles ( this . element ) ;
49+ ParallaxController . resetElementStyles ( this . element ) ;
5050 }
5151 }
5252
5353 componentWillUnmount ( ) {
54- ParallaxScrollListener . removeElement ( this . element ) ;
54+ ParallaxController . removeElement ( this . element ) ;
5555 }
5656
5757 // refs
Original file line number Diff line number Diff line change 11export Parallax from './components/Parallax' ;
2- export ParallaxScroller from './libs/ParallaxScroller ' ;
2+ export ParallaxController from './libs/ParallaxController ' ;
You can’t perform that action at this time.
0 commit comments