Comparing version 10.4.11 to 10.4.12-rc0
@@ -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(); |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86027
1144
1