Socket
Socket
Sign inDemoInstall

react-resizable-box

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-resizable-box - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

31

lib/index.js

@@ -63,7 +63,8 @@ 'use strict';

_this.onMouseUp = _this.onMouseUp.bind(_this);
window.addEventListener('mouseup', _this.onMouseUp);
window.addEventListener('mousemove', _this.onMouseMove);
window.addEventListener('touchmove', _this.onTouchMove);
window.addEventListener('touchend', _this.onMouseUp);
if (typeof window !== 'undefined') {
window.addEventListener('mouseup', _this.onMouseUp);
window.addEventListener('mousemove', _this.onMouseMove);
window.addEventListener('touchmove', _this.onTouchMove);
window.addEventListener('touchend', _this.onMouseUp);
}
return _this;

@@ -95,6 +96,8 @@ }

value: function componentWillUnmount() {
window.removeEventListener('mouseup', this.onMouseUp);
window.removeEventListener('mousemove', this.onMouseMove);
window.removeEventListener('touchmove', this.onTouchMove);
window.removeEventListener('touchend', this.onMouseUp);
if (typeof window !== 'undefined') {
window.removeEventListener('mouseup', this.onMouseUp);
window.removeEventListener('mousemove', this.onMouseMove);
window.removeEventListener('touchmove', this.onTouchMove);
window.removeEventListener('touchend', this.onMouseUp);
}
}

@@ -229,5 +232,9 @@ }, {

value: function getBoxSize() {
var style = window.getComputedStyle(this.refs.resizable, null);
var width = ~~style.getPropertyValue('width').replace('px', '');
var height = ~~style.getPropertyValue('height').replace('px', '');
var width = '0';
var height = '0';
if (typeof window !== 'undefined') {
var style = window.getComputedStyle(this.refs.resizable, null);
width = ~~style.getPropertyValue('width').replace('px', '');
height = ~~style.getPropertyValue('height').replace('px', '');
}
return { width: width, height: height };

@@ -234,0 +241,0 @@ }

{
"name": "react-resizable-box",
"version": "1.6.0",
"version": "1.7.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.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