Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mangoweb/parallax

Package Overview
Dependencies
Maintainers
6
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mangoweb/parallax - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

lib/index.js

@@ -27,3 +27,3 @@ "use strict";

var reachDistance = window.innerHeight * PARALLAX_REACH;
var offset = clamp(-1, (_this.getElementYCenter() - (window.scrollY + window.innerHeight / 2)) / reachDistance, 1);
var offset = clamp(-1, -(_this.getElementYCenter() - (window.scrollY + window.innerHeight / 2)) / reachDistance, 1);
_this.el.style.setProperty("--" + _this.getPropOrElse('customProperty', 'parallax'), "" + offset);

@@ -30,0 +30,0 @@ };

{
"name": "@mangoweb/parallax",
"version": "0.0.1",
"version": "0.0.2",
"description": "Watches elements vertical position in viewport.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -23,3 +23,3 @@ import { Component } from '@mangoweb/scripts-base'

const reachDistance = window.innerHeight * PARALLAX_REACH
const offset = clamp(-1, (this.getElementYCenter() - (window.scrollY + window.innerHeight / 2)) / reachDistance, 1)
const offset = clamp(-1, -(this.getElementYCenter() - (window.scrollY + window.innerHeight / 2)) / reachDistance, 1)

@@ -26,0 +26,0 @@ this.el.style.setProperty(`--${this.getPropOrElse('customProperty', 'parallax')}`, `${offset}`)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc