Socket
Socket
Sign inDemoInstall

re-resizable

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

re-resizable - npm Package Compare versions

Comparing version 6.9.11 to 6.9.12

16

lib/index.es5.js

@@ -682,2 +682,4 @@ 'use strict';

newHeight = newSize.newHeight;
var widthChangedWithGrid = false;
var heightChangedWithGrid = false;
if (this.props.grid) {

@@ -687,4 +689,6 @@ var newGridWidth = snap(newWidth, this.props.grid[0]);

var gap = this.props.snapGap || 0;
newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;
newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;
widthChangedWithGrid = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap;
heightChangedWithGrid = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap;
newWidth = widthChangedWithGrid ? newGridWidth : newWidth;
newHeight = heightChangedWithGrid ? newGridHeight : newHeight;
}

@@ -738,3 +742,9 @@ var delta = {

if (this.props.onResize) {
this.props.onResize(event, direction, this.resizable, delta);
if (!this.props.grid) {
this.props.onResize(event, direction, this.resizable, delta);
// fix #783
}
else if (widthChangedWithGrid || heightChangedWithGrid) {
this.props.onResize(event, direction, this.resizable, delta);
}
}

@@ -741,0 +751,0 @@ };

@@ -615,2 +615,4 @@ var __extends = (this && this.__extends) || (function () {

newHeight = newSize.newHeight;
var widthChangedWithGrid = false;
var heightChangedWithGrid = false;
if (this.props.grid) {

@@ -620,4 +622,6 @@ var newGridWidth = snap(newWidth, this.props.grid[0]);

var gap = this.props.snapGap || 0;
newWidth = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap ? newGridWidth : newWidth;
newHeight = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap ? newGridHeight : newHeight;
widthChangedWithGrid = gap === 0 || Math.abs(newGridWidth - newWidth) <= gap;
heightChangedWithGrid = gap === 0 || Math.abs(newGridHeight - newHeight) <= gap;
newWidth = widthChangedWithGrid ? newGridWidth : newWidth;
newHeight = heightChangedWithGrid ? newGridHeight : newHeight;
}

@@ -671,3 +675,9 @@ var delta = {

if (this.props.onResize) {
this.props.onResize(event, direction, this.resizable, delta);
if (!this.props.grid) {
this.props.onResize(event, direction, this.resizable, delta);
// fix #783
}
else if (widthChangedWithGrid || heightChangedWithGrid) {
this.props.onResize(event, direction, this.resizable, delta);
}
}

@@ -674,0 +684,0 @@ };

2

package.json
{
"name": "re-resizable",
"version": "6.9.11",
"version": "6.9.12",
"description": "Resizable component for React.",

@@ -5,0 +5,0 @@ "title": "re-resizable",

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