Socket
Socket
Sign inDemoInstall

react-rnd

Package Overview
Dependencies
3
Maintainers
1
Versions
93
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.3.3 to 10.3.4

8

lib/index.es5.js

@@ -326,3 +326,3 @@ 'use strict';

var hasBottom = dir.startsWith("bottom");
if (hasLeft && this.resizable) {
if ((hasLeft || hasTop) && this.resizable) {
var max = (selfLeft - boundaryLeft) / scale + this.resizable.size.width;

@@ -332,7 +332,7 @@ this.setState({ maxWidth: max > Number(maxWidth) ? maxWidth : max });

// INFO: To set bounds in `lock aspect ratio with bounds` case. See also that story.
if (hasRight || (this.props.lockAspectRatio && !hasLeft)) {
if (hasRight || (this.props.lockAspectRatio && !hasLeft && !hasTop)) {
var max = offsetWidth + (boundaryLeft - selfLeft) / scale;
this.setState({ maxWidth: max > Number(maxWidth) ? maxWidth : max });
}
if (hasTop && this.resizable) {
if ((hasTop || hasLeft) && this.resizable) {
var max = (selfTop - boundaryTop) / scale + this.resizable.size.height;

@@ -344,3 +344,3 @@ this.setState({

// INFO: To set bounds in `lock aspect ratio with bounds` case. See also that story.
if (hasBottom || (this.props.lockAspectRatio && !hasTop)) {
if (hasBottom || (this.props.lockAspectRatio && !hasTop && !hasLeft)) {
var max = offsetHeight + (boundaryTop - selfTop) / scale;

@@ -347,0 +347,0 @@ this.setState({

@@ -320,3 +320,3 @@ import { createElement, PureComponent } from 'react';

var hasBottom = dir.startsWith("bottom");
if (hasLeft && this.resizable) {
if ((hasLeft || hasTop) && this.resizable) {
var max = (selfLeft - boundaryLeft) / scale + this.resizable.size.width;

@@ -326,7 +326,7 @@ this.setState({ maxWidth: max > Number(maxWidth) ? maxWidth : max });

// INFO: To set bounds in `lock aspect ratio with bounds` case. See also that story.
if (hasRight || (this.props.lockAspectRatio && !hasLeft)) {
if (hasRight || (this.props.lockAspectRatio && !hasLeft && !hasTop)) {
var max = offsetWidth + (boundaryLeft - selfLeft) / scale;
this.setState({ maxWidth: max > Number(maxWidth) ? maxWidth : max });
}
if (hasTop && this.resizable) {
if ((hasTop || hasLeft) && this.resizable) {
var max = (selfTop - boundaryTop) / scale + this.resizable.size.height;

@@ -338,3 +338,3 @@ this.setState({

// INFO: To set bounds in `lock aspect ratio with bounds` case. See also that story.
if (hasBottom || (this.props.lockAspectRatio && !hasTop)) {
if (hasBottom || (this.props.lockAspectRatio && !hasTop && !hasLeft)) {
var max = offsetHeight + (boundaryTop - selfTop) / scale;

@@ -341,0 +341,0 @@ this.setState({

{
"name": "react-rnd",
"version": "10.3.3",
"version": "10.3.4",
"description": "",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc