New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

svelte-gestures

Package Overview
Dependencies
Maintainers
0
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-gestures - npm Package Compare versions

Comparing version 5.1.0-beta.3 to 5.1.0-beta.4

7

dist/index.esm.svelte.js

@@ -1083,3 +1083,3 @@ const DEFAULT_DELAY = 300; // ms

let canvas = undefined;
let ctx;
let ctx = null;
let offScreenCanvas = undefined;

@@ -1094,9 +1094,10 @@ let offScreenCtx;

function animate() {
const fadeTime = options.fadeTime ?? fallbacks.fadeTime;
const now = Date.now();
const deltaTime = now - animationStepTime;
if (deltaTime > 100) {
if (deltaTime > fadeTime / 20) {
if (ctx && offScreenCanvas && offScreenCtx && canvas) {
offScreenCtx.drawImage(canvas, 0, 0);
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.globalAlpha = 1 - deltaTime * 3 / (options.fadeTime ?? fallbacks.fadeTime);
ctx.globalAlpha = 1 - deltaTime * 3 / fadeTime;
ctx.drawImage(offScreenCanvas, 0, 0);

@@ -1103,0 +1104,0 @@ ctx.globalAlpha = 1;

@@ -1084,3 +1084,3 @@ 'use strict';

let canvas = undefined;
let ctx;
let ctx = null;
let offScreenCanvas = undefined;

@@ -1095,10 +1095,11 @@ let offScreenCtx;

function animate() {
var _options$fadeTime;
const fadeTime = (_options$fadeTime = options.fadeTime) !== null && _options$fadeTime !== void 0 ? _options$fadeTime : fallbacks.fadeTime;
const now = Date.now();
const deltaTime = now - animationStepTime;
if (deltaTime > 100) {
if (deltaTime > fadeTime / 20) {
if (ctx && offScreenCanvas && offScreenCtx && canvas) {
var _options$fadeTime;
offScreenCtx.drawImage(canvas, 0, 0);
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.globalAlpha = 1 - deltaTime * 3 / ((_options$fadeTime = options.fadeTime) !== null && _options$fadeTime !== void 0 ? _options$fadeTime : fallbacks.fadeTime);
ctx.globalAlpha = 1 - deltaTime * 3 / fadeTime;
ctx.drawImage(offScreenCanvas, 0, 0);

@@ -1105,0 +1106,0 @@ ctx.globalAlpha = 1;

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "5.1.0-beta.3",
"version": "5.1.0-beta.4",
"main": "dist/index.svelte.js",

@@ -9,0 +9,0 @@ "module": "dist/index.esm.svelte.js",

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