apeman react package for draggable component.
npm install apeman-react-draggableapeman-react-draggable
==========
[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]
[bd_repo_url]: https://github.com/apeman-react-labo/apeman-react-draggable
[bd_travis_url]: http://travis-ci.org/apeman-react-labo/apeman-react-draggable
[bd_travis_shield_url]: http://img.shields.io/travis/apeman-react-labo/apeman-react-draggable.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/apeman-react-labo/apeman-react-draggable
[bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-react-labo/apeman-react-draggable.svg?token=
[bd_license_url]: https://github.com/apeman-react-labo/apeman-react-draggable/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/apeman-react-labo/apeman-react-draggable
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-react-labo/apeman-react-draggable.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-react-labo/apeman-react-draggable.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/apeman-react-labo/apeman-react-draggable
[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-react-labo/apeman-react-draggable.svg
[bd_npm_url]: http://www.npmjs.org/package/apeman-react-draggable
[bd_npm_shield_url]: http://img.shields.io/npm/v/apeman-react-draggable.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
apeman react package for draggable component.
Installation
-----
``bash`
$ npm install apeman-react-draggable --save
Demo
-----
[Live demo][demo_url] is hosted on GitHub Pages.
[demo_url]: http://apeman-react-labo.github.io/apeman-react-draggable/demo/demo.html
Usage
---------
`jsx
'use strict'
import React from 'react'
import {ApDraggable, ApDraggableStyle} from 'apeman-react-draggable'
const ExampleComponent = React.createClass({
render () {
return (
} }
onMove={ () => {
} }
onEnd={ () => {
} }
direction="ALL">
``
Components
-----
Props
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| style | object | {} | | |
Props
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| onStart | func | | | Handler for drag start |
| onMove | func | | | Handler for drag move |
| onStop | func | | | Handler for drag stop |
| shouldMove | func | function() {
return true
} | | |
| direction | enum | 'ALL' | | Move direction |
| x | number | | | |
| minX | number | Number.MIN_SAFE_INTEGER || (-9007199254740991) | | |
| maxX | number | Number.MAX_SAFE_INTEGER || (9007199254740991) | | |
| y | number | | | |
| minY | number | Number.MIN_SAFE_INTEGER || (-9007199254740991) | | |
| maxY | number | Number.MAX_SAFE_INTEGER || (9007199254740991) | | |
Props
-----
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| onStart | function | | Callback when drag started. |
| onMove | function | | Callback when drag moved. |
| onStop | function | | Callback when drag stopped. |
| shouldMove | function | | Called when drag moved. Returns false to cancel moving. |
| direction | string | | Move direction. |
| x | number | | X position. |
| minX | number | MIN_SAFE_INTEGER | Min x position. |
| maxX | number | MAX_SAFE_INTEGER | Max x position. |
| y | number | | Y potion. |
| minY | number | MIN_SAFE_INTEGER | Min y position. |
| maxY | number | MAX_SAFE_INTEGER | Max y position. |
License
-------
This software is released under the MIT License.
Links
------
+ [apeman][apeman_url]
+ [apeman-react-labo][apeman_react_labo_url]
+ [React][react_url]
[apeman_url]: https://github.com/apeman-labo/apeman
[apeman_react_labo_url]: https://github.com/apeman-react-labo
[react_url]: https://facebook.github.io/react/