react-scroll-parallax
Advanced tools
Comparing version 1.0.0 to 1.0.2
{ | ||
"name": "react-scroll-parallax", | ||
"version": "1.0.0", | ||
"version": "1.0.2", | ||
"description": "React component to create parallax scrolling effects", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -23,3 +23,3 @@ # React Scroll Parallax | ||
Import `ParallaxController` on the client side and call `ParallaxController.init()` to create the global `ParallaxController` which will handle updating all parallax elements on scroll. | ||
Import `ParallaxController` on the client side and call `ParallaxController.init()` to create the global `ParallaxController` on the `window` which will handle controlling all parallax elements on scroll. Ideally, this would be called at the root of your react app on the client. | ||
@@ -52,3 +52,3 @@ ```javascript | ||
NOTE: `ParallaxController` caches the scroll state and positions of elements on the page for performance reasons. This means that if the page height changes (perhaps by images loading) after `<Parallax />` components are mounted it won't properly determine when the elements are in view. To correct this call the `update()` once every thing has loaded and ready. | ||
**NOTE:** `ParallaxController` caches the scroll state and positions of elements on the page for performance reasons. This means that if the page height changes (perhaps from images loading) after `<Parallax />` components are mounted it won't properly determine when the elements are in view. To correct this call the `update()` from the global `ParallaxController` once every thing has loaded and is ready. | ||
@@ -116,4 +116,2 @@ ## Parallax Component Props | ||
The following are public methods available on the `ParallaxController` global: | ||
**`init()`** | ||
@@ -123,2 +121,6 @@ | ||
**NOTE:** Calling `ParallaxController.init()` creates an instance of the controller on the `window` using the same name, e.g. `window.ParallaxController`. | ||
The following are public methods available on the `window.ParallaxController` global: | ||
**`update()`** | ||
@@ -125,0 +127,0 @@ |
78934
159