Comparing version 10.3.0 to 10.3.1
@@ -30,2 +30,3 @@ import * as React from "react"; | ||
declare type State = { | ||
original: Position; | ||
bounds: { | ||
@@ -32,0 +33,0 @@ top: number; |
@@ -103,2 +103,6 @@ 'use strict'; | ||
_this.state = { | ||
original: { | ||
x: 0, | ||
y: 0, | ||
}, | ||
bounds: { | ||
@@ -273,3 +277,5 @@ top: 0, | ||
this.resizingPosition = { x: pos.x + offset.left, y: pos.y + offset.top }; | ||
this.originalPosition = pos; | ||
this.setState({ | ||
original: pos, | ||
}); | ||
if (this.props.bounds) { | ||
@@ -362,3 +368,3 @@ var parent_1 = this.getParent(); | ||
// INFO: Apply x and y position adjustments caused by resizing to draggable | ||
var newPos = { x: this.originalPosition.x, y: this.originalPosition.y }; | ||
var newPos = { x: this.state.original.x, y: this.state.original.y }; | ||
var left = -delta.width; | ||
@@ -365,0 +371,0 @@ var top = -delta.height; |
@@ -97,2 +97,6 @@ import { createElement, PureComponent } from 'react'; | ||
_this.state = { | ||
original: { | ||
x: 0, | ||
y: 0, | ||
}, | ||
bounds: { | ||
@@ -267,3 +271,5 @@ top: 0, | ||
this.resizingPosition = { x: pos.x + offset.left, y: pos.y + offset.top }; | ||
this.originalPosition = pos; | ||
this.setState({ | ||
original: pos, | ||
}); | ||
if (this.props.bounds) { | ||
@@ -356,3 +362,3 @@ var parent_1 = this.getParent(); | ||
// INFO: Apply x and y position adjustments caused by resizing to draggable | ||
var newPos = { x: this.originalPosition.x, y: this.originalPosition.y }; | ||
var newPos = { x: this.state.original.x, y: this.state.original.y }; | ||
var left = -delta.width; | ||
@@ -359,0 +365,0 @@ var top = -delta.height; |
{ | ||
"name": "react-rnd", | ||
"version": "10.3.0", | ||
"version": "10.3.1", | ||
"description": "", | ||
@@ -62,3 +62,3 @@ "title": "react-rnd", | ||
"@types/react-dom": "16.0.11", | ||
"@types/sinon": "9.0.0", | ||
"@types/sinon": "10.0.0", | ||
"@types/storybook__addon-actions": "5.2.1", | ||
@@ -74,3 +74,3 @@ "@types/storybook__react": "5.2.1", | ||
"enzyme-adapter-react-16": "1.9.1", | ||
"gh-pages": "2.2.0", | ||
"gh-pages": "3.1.0", | ||
"light-ts-loader": "1.1.2", | ||
@@ -90,3 +90,3 @@ "npm-run-all": "4.1.5", | ||
"rollup-watch": "4.3.1", | ||
"sinon": "9.0.2", | ||
"sinon": "10.0.0", | ||
"tslint": "6.1.3", | ||
@@ -93,0 +93,0 @@ "tslint-eslint-rules": "5.4.0", |
@@ -5,4 +5,3 @@ <p align="center"><img src ="https://github.com/bokuweb/react-rnd/blob/master/logo.png?raw=true" /></p> | ||
<p align="center"><a href="https://circleci.com/gh/bokuweb/react-rnd/tree/master"> | ||
<img src="https://circleci.com/gh/bokuweb/react-rnd/tree/master.svg?style=svg" alt="Build Status" /></a> | ||
<p align="center"><img src="https://github.com/bokuweb/react-rnd/workflows/Continuous%20Integration/badge.svg" alt="Build Status" /> | ||
<a href="https://www.npmjs.com/package/react-rnd"> | ||
@@ -9,0 +8,0 @@ <img src="https://img.shields.io/npm/v/react-rnd.svg" alt="Build Status" /></a> |
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
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
127707
1888
863