Socket
Socket
Sign inDemoInstall

react-rnd

Package Overview
Dependencies
Maintainers
1
Versions
96
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.2-test2 to 10.4.2-test3

4

lib/index.es5.js

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

Rnd.prototype.componentDidMount = function () {
if (this.props.position)
return;
this.updateOffsetFromParent();

@@ -248,3 +246,3 @@ var _a = this.offsetFromParent, left = _a.left, top = _a.top;

if (!this.props.dragAxis || this.props.dragAxis === "both") {
return this.props.onDrag(e, __assign(__assign({}, data), { x: data.x - left, y: data.y - top }));
return this.props.onDrag(e, __assign(__assign({}, data), { x: data.x + left, y: data.y + top }));
}

@@ -251,0 +249,0 @@ else if (this.props.dragAxis === "x") {

@@ -116,4 +116,2 @@ import { createElement, PureComponent } from 'react';

Rnd.prototype.componentDidMount = function () {
if (this.props.position)
return;
this.updateOffsetFromParent();

@@ -242,3 +240,3 @@ var _a = this.offsetFromParent, left = _a.left, top = _a.top;

if (!this.props.dragAxis || this.props.dragAxis === "both") {
return this.props.onDrag(e, __assign(__assign({}, data), { x: data.x - left, y: data.y - top }));
return this.props.onDrag(e, __assign(__assign({}, data), { x: data.x + left, y: data.y + top }));
}

@@ -245,0 +243,0 @@ else if (this.props.dragAxis === "x") {

{
"name": "react-rnd",
"version": "10.4.2-test2",
"version": "10.4.2-test3",
"description": "",

@@ -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