Socket
Socket
Sign inDemoInstall

react-rnd

Package Overview
Dependencies
Maintainers
1
Versions
95
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-rnd - npm Package Compare versions

Comparing version 10.4.11 to 10.4.12-rc0

6

lib/index.es5.js

@@ -10,2 +10,3 @@ 'use strict';

var reResizable = require('re-resizable');
var reactDom = require('react-dom');

@@ -356,2 +357,3 @@ /*! *****************************************************************************

Rnd.prototype.onResize = function (e, direction, elementRef, delta) {
var _this = this;
// INFO: Apply x and y position adjustments caused by resizing to draggable

@@ -376,3 +378,5 @@ var newPos = { x: this.originalPosition.x, y: this.originalPosition.y };

if (newPos.x !== draggableState.x || newPos.y !== draggableState.y) {
this.draggable.setState(newPos);
reactDom.flushSync(function () {
_this.draggable.setState(newPos);
});
}

@@ -379,0 +383,0 @@ this.updateOffsetFromParent();

import { createElement, PureComponent } from 'react';
import Draggable from 'react-draggable';
import { Resizable } from 're-resizable';
import { flushSync } from 'react-dom';

@@ -349,2 +350,3 @@ /*! *****************************************************************************

Rnd.prototype.onResize = function (e, direction, elementRef, delta) {
var _this = this;
// INFO: Apply x and y position adjustments caused by resizing to draggable

@@ -369,3 +371,5 @@ var newPos = { x: this.originalPosition.x, y: this.originalPosition.y };

if (newPos.x !== draggableState.x || newPos.y !== draggableState.y) {
this.draggable.setState(newPos);
flushSync(function () {
_this.draggable.setState(newPos);
});
}

@@ -372,0 +376,0 @@ this.updateOffsetFromParent();

2

package.json
{
"name": "react-rnd",
"version": "10.4.11",
"version": "10.4.12-rc0",
"description": "A draggable and resizable React Component",

@@ -5,0 +5,0 @@ "title": "react-rnd",

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