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

react-selectable-fast

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-selectable-fast - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

14

lib/Selectable-group.js

@@ -255,4 +255,4 @@ 'use strict';

var scrollTop = this.scrollContainer.scrollTop;
var applyContainerScroll = function applyContainerScroll(top, scroll) {
return top + scroll / _this3.props.scale;
var applyContainerScroll = function applyContainerScroll(value, scroll) {
return value + scroll / _this3.props.scale;
};

@@ -267,12 +267,12 @@

var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
var windowScroll = isChrome ? window.scrollY : document.documentElement.scrollTop;
var windowTopScroll = isChrome ? window.scrollY : document.documentElement.scrollTop;
var windowLeftScroll = isChrome ? window.scrollX : document.documentElement.scrollLeft;
var top = applyContainerScroll(scaledTop - this.scrollBounds.top, scrollTop - windowScroll);
var boxTop = applyContainerScroll(this.mouseDownData.boxTop - this.scrollBounds.top, this.mouseDownData.scrollTop - windowScroll);
var top = applyContainerScroll(scaledTop - this.scrollBounds.top, scrollTop - windowTopScroll);
var boxTop = applyContainerScroll(this.mouseDownData.boxTop - this.scrollBounds.top, this.mouseDownData.scrollTop - windowTopScroll);
var h = boxTop - top;
boxTop = Math.min(boxTop - h, boxTop);
var w = this.mouseDownData.boxLeft - scaledLeft;
var leftContainerRelative = this.mouseDownData.boxLeft - this.scrollBounds.left;
var boxLeft = Math.min(leftContainerRelative - w / this.props.scale, leftContainerRelative / this.props.scale);
var boxLeft = applyContainerScroll(Math.min(leftContainerRelative - w / this.props.scale, leftContainerRelative / this.props.scale), -windowLeftScroll);

@@ -279,0 +279,0 @@ this.updatedSelecting();

{
"name": "react-selectable-fast",
"version": "1.0.0",
"version": "1.0.1",
"description": "Enable other React components to be selectable by drawing a box with your mouse/touch",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is too big to display

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