Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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 5.0.6 to 5.0.7

8

lib/index.js

@@ -240,2 +240,7 @@ 'use strict';

var cursorStyle = this.props.disableDragging ? { cursor: 'normal' } : {};
var innerStyle = (0, _extends3.default)({}, boxStyle, {
zIndex: this.state.z
}, cursorStyle);
return _react2.default.createElement(

@@ -253,2 +258,3 @@ _reactDraggable2.default,

axis: this.props.dragAxis,
disabled: this.props.disableDragging,
grid: this.props.dragGrid,

@@ -261,3 +267,3 @@ bounds: this.props.bounds ? this.state.bounds : undefined

className: this.props.className,
style: (0, _extends3.default)({}, boxStyle, { zIndex: this.state.z }),
style: innerStyle,
ref: function ref(c) {

@@ -264,0 +270,0 @@ _this2.wrapper = c;

2

package.json
{
"name": "react-rnd",
"license": "MIT",
"version": "5.0.6",
"version": "5.0.7",
"main": "lib/index.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -26,3 +26,3 @@ # react-rnd

![screenshot](https://raw.githubusercontent.com/bokuweb/react-rnd/master/screenshot.gif)
See demo: [http://bokuweb.github.io/react-rnd/](http://bokuweb.github.io/react-rnd/)

@@ -67,6 +67,6 @@ demo Code: [https://github.com/bokuweb/react-rnd/blob/master/docs/src/example.js](https://github.com/bokuweb/react-rnd/blob/master/docs/src/example.js)

#### `default: { x: number; y: number; width: number | string; height: number | string; };`
The `width` and `height` property is used to set the default size of a component.
The `x` and `y` property is used to set the default position of the component.
#### `className?: string;`

@@ -110,3 +110,3 @@

The `z` property is used to set the zIndex of a component.
The `z` property is used to set the zIndex of a component.

@@ -116,3 +116,3 @@ #### `resizeGrid?: [number, number];`

The `resizeGrid` property is used to specify the increments that resizing should snap to. Defaults to `[1, 1]`.
#### `dragGrid?: [number, number];`

@@ -130,3 +130,3 @@

Specifies a selector to be used as the handle that initiates drag.
Example: '.handle'.
Example: '.handle'.

@@ -177,3 +177,3 @@ #### `resizeHandlerStyles?: HandlersStyles;`

If omitted, all resizer are enabled.
If you want to permit only right direction resizing, set `{ top:false, right:true, bottom:false, left:false, topRight:false, bottomRight:false, bottomLeft:false, topLeft:false }`.
If you want to permit only right direction resizing, set `{ top:false, right:true, bottom:false, left:false, topRight:false, bottomRight:false, bottomLeft:false, topLeft:false }`.

@@ -188,3 +188,3 @@ ``` javascript

top?: boolean;
topLeft?: boolea;
topLeft?: boolean;
topRight?: boolean;

@@ -194,2 +194,6 @@ }

#### `disableDragging?: boolean;`
The `disableDragging` property disables dragging completely.
#### `extendsProps?: any;`

@@ -213,3 +217,3 @@

The direction of allowed movement (dragging) allowed ('x','y','both','none').
#### `bounds?: string;`

@@ -289,3 +293,3 @@

```
#### `onDrag: DraggableEventHandler;`

@@ -343,7 +347,7 @@

...
update() {
this.rnd.updateSize({ width: 200, height: 300 });
}
render() {

@@ -360,3 +364,3 @@ return (

```
#### `updatePosition({ x: number, x: number })`

@@ -373,7 +377,7 @@

...
update() {
this.rnd.updatePosition({ x: 200, y: 300 });
}
render() {

@@ -401,7 +405,7 @@ return (

...
update() {
this.rnd.updateZIndex(200);
}
render() {

@@ -418,4 +422,4 @@ return (

```
## Test

@@ -429,2 +433,14 @@

#### v5.0.7
- Add `disableDragging` props.
#### v5.0.6
- Fix flow error.
#### v5.0.5
- Add index.js.flow
#### v5.0.4

@@ -431,0 +447,0 @@

Sorry, the diff of this file is not supported yet

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