parallax-react-js
Advanced tools
Comparing version 1.0.13 to 1.0.14
import React from "react"; | ||
import { useState, useEffect } from "react"; | ||
import isAtLeastOneInView from './functions/isAtLeastOneInView'; | ||
function ParallaxContainer(props) { | ||
@@ -40,5 +39,3 @@ var thisContainerPrefetch = React.createRef(); //create reference to this main div of the ParallaxContainer | ||
//the current position and the distance scrolled between now and the last "onscroll" event. | ||
if (isAtLeastOneInView(childrenarray[i])) { | ||
childrenarray[i].style.transform = "translateY(" + (prevPosY + deltaScroll * (1 - parseFloat(childrenarray[i].getAttribute("parallaxSpeed").replace("%", "")) / 100)).toString() + "px)"; | ||
} | ||
childrenarray[i].style.transform = "translateY(" + (prevPosY + deltaScroll * (1 - parseFloat(childrenarray[i].getAttribute("parallaxSpeed").replace("%", "")) / 100)).toString() + "px)"; | ||
} | ||
@@ -45,0 +42,0 @@ catch (error) { //handle errors |
{ | ||
"name": "parallax-react-js", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "A libary for managing scroll speed of different components in react.", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20951
122