Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mikefey committed Feb 24, 2016
1 parent 7b90d3c commit 3956e37
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ import ReactDraggable from 'react-draggable';
```

## props
**additionalClass {String}** - A string of additional classnames to add to the element
**bounds {Object}** - An array of coordinates, forming a square, that the user cannot drag the component outside of, in the format {x1: Number, y1: Number, x2: Number, y2: Number}
**contentPosition {String}** - The css positioning for for the element ('absolute' or 'fixed', defaults to 'absolute')
**dragCallback {Function}** - The function to call while the user is dragging
**dragStartCallback {Function}** - The function to call when the user starts dragging
**dragStopCallback {Function}** - The function to call when the user stops dragging
**dragLeaveCallback {Function}** - A function to call when the user is dragging and the mouse/touch leaves the draggable component
**initialPosition {Object}** - An object with initial x and y values for the content
**lock {String}** - An axis to lock element to when dragging, either 'x' or 'y'
**preventDefaultEvents {Boolean}** - Whether to prevent default mouse/touch events
**touchScrollLock {String}** - If set to true, prevents the content from being dragged if the user is scrolling in the opposite direction on a touchend device
**translate3d {Boolean}** - Whether to use css3 transform3d for positioning
**additionalClass {String}** - A string of additional classnames to add to the element
**bounds {Object}** - An array of coordinates, forming a square, that the user cannot drag the component outside of, in the format {x1: Number, y1: Number, x2: Number, y2: Number}
**contentPosition {String}** - The css positioning for for the element ('absolute' or 'fixed', defaults to 'absolute')
**dragCallback {Function}** - The function to call while the user is dragging
**dragStartCallback {Function}** - The function to call when the user starts dragging
**dragStopCallback {Function}** - The function to call when the user stops dragging
**dragLeaveCallback {Function}** - A function to call when the user is dragging and the mouse/touch leaves the draggable component
**initialPosition {Object}** - An object with initial x and y values for the content
**lock {String}** - An axis to lock element to when dragging, either 'x' or 'y'
**preventDefaultEvents {Boolean}** - Whether to prevent default mouse/touch events
**touchScrollLock {String}** - If set to true, prevents the content from being dragged if the user is scrolling in the opposite direction on a touchend device
**translate3d {Boolean}** - Whether to use css3 transform3d for positioning

## methods
**setEnabled({Boolean})** - Sets the whether the draggability is enabled
**setStyle({Object})** - Sets the style of the component
**setPosition({Object})** - Sets the position of the component with an object passed in format {x: Number, y: number}
**getPosition()** - Gets the current x and y position of the component
**setEnabled({Boolean})** - Sets the whether the draggability is enabled
**setStyle({Object})** - Sets the style of the component
**setPosition({Object})** - Sets the position of the component with an object passed in format {x: Number, y: number}
**getPosition()** - Gets the current x and y position of the component
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "react-draggable",
"name": "react-draggable-component",
"version": "1.0.0",
"description": "A wrapper React component that adds draggable functionality to an element",
"main": "index.js",
Expand Down

0 comments on commit 3956e37

Please sign in to comment.