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

react-draggable

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-draggable - npm Package Compare versions

Comparing version 0.7.0 to 0.7.1

2

bower.json
{
"name": "react-draggable",
"version": "0.7.0",
"version": "0.7.1",
"homepage": "https://github.com/mzabriskie/react-draggable",

@@ -5,0 +5,0 @@ "authors": [

@@ -70,1 +70,7 @@ # Changelog

direction by that many pixels.
### 0.7.1 (May 7, 2015)
- The `start` param is back. Pass `{x: Number, y: Number}` to kickoff the CSS transform. Useful in certain
cases for simpler callback math (so you don't have to know its existing relative position and add it to
the dragged position). Fixes #52.

@@ -368,2 +368,24 @@ 'use strict';

/**
* `start` specifies the x and y that the dragged item should start at
*
* Example:
*
* ```jsx
* var App = React.createClass({
* render: function () {
* return (
* <Draggable start={{x: 25, y: 25}}>
* <div>I start with transformX: 25px and transformY: 25px;</div>
* </Draggable>
* );
* }
* });
* ```
*/
start: React.PropTypes.shape({
x: React.PropTypes.number,
y: React.PropTypes.number
}),
/**
* `zIndex` specifies the zIndex to use while dragging.

@@ -470,2 +492,3 @@ *

grid: null,
start: {x: 0, y: 0},
zIndex: NaN,

@@ -489,3 +512,3 @@ enableUserSelectHack: true,

// Current transform x and y.
clientX: 0, clientY: 0
clientX: this.props.start.x, clientY: this.props.start.y
};

@@ -492,0 +515,0 @@ },

{
"name": "react-draggable",
"version": "0.7.0",
"version": "0.7.1",
"description": "React draggable component",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -83,2 +83,6 @@ # react-draggable [![Build Status](https://travis-ci.org/mzabriskie/react-draggable.svg?branch=master)](https://travis-ci.org/mzabriskie/react-draggable)

//
// `start` specifies the x and y that the dragged item should start at. This is generally not necessary
// to use (you can use absolute or relative positioning of the child directly), but can be helpful
// for uniformity in your callbacks and with css transforms.
//
// `zIndex` specifies the zIndex to use while dragging.

@@ -85,0 +89,0 @@ //

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