Socket
Socket
Sign inDemoInstall

react-fast-marquee

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fast-marquee - npm Package Compare versions

Comparing version 1.0.9 to 1.0.10

19

dist/index.js

@@ -57,3 +57,5 @@

var _t = React.useState(0), marqueeWidth = _t[0], setMarqueeWidth = _t[1];
var _u = React.useState(0), duration = _u[0], setDuration = _u[1];
var _u = React.useState(0), containerOffsetWidth = _u[0], setContainerOffsetWidth = _u[1];
var _v = React.useState(0), marqueeOffsetWidth = _v[0], setMarqueeOffsetWidth = _v[1];
var _w = React.useState(0), duration = _w[0], setDuration = _w[1];
var containerRef = React.useRef(null);

@@ -66,5 +68,16 @@ var marqueeRef = React.useRef(null);

setMarqueeWidth(marqueeRef.current.getBoundingClientRect().width);
setContainerOffsetWidth(containerRef.current.offsetWidth);
setMarqueeOffsetWidth(marqueeRef.current.offsetWidth);
}
/* Set duration of animation based off speed */
setDuration(marqueeWidth / speed);
console.log("Container Width:" + containerWidth);
console.log("Marquee Width:" + marqueeWidth);
console.log("Container Offset Width:" + containerOffsetWidth);
console.log("Marquee Offset Width:" + marqueeOffsetWidth);
// marqueeWidth < containerWidth ? containerWidth - marqueeWidth : 0
if (marqueeWidth < containerWidth) {
setDuration(containerWidth / speed);
}
else {
setDuration(marqueeWidth / speed);
}
});

@@ -71,0 +84,0 @@ // Gradient color in an unfinished rgba format

2

package.json
{
"name": "react-fast-marquee",
"version": "1.0.9",
"version": "1.0.10",
"description": "A lightweight React component that utilizes the power of CSS animations to create silky smooth marquees.",

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

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