apeman-react-draggable
apeman react package for draggable component.
Last updated 4 years ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install apeman-react-draggable 
SYNC missed versions from official npm registry.

apeman-react-draggable

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for draggable component.

Installation

$ npm install apeman-react-draggable --save

Demo

Live demo is hosted on GitHub Pages.

Usage

'use strict'

import React from 'react'
import {ApDraggable, ApDraggableStyle} from 'apeman-react-draggable'

const ExampleComponent = React.createClass({
  render () {
    return (
      <div>
        <ApDraggableStyle/>
        <ApDraggable onStart={ () => {

                } }
                     onMove={ () => {

                 } }
                     onEnd={ () => {

                 } }
                     direction="ALL">
          <div>Drag me!</div>
        </ApDraggable>
      </div>
    )
  }
})

Components

ApDraggableStyle

Props

Name Type Default Description
style object {}

ApDraggable

Props

Name Type Default Description
onStart func
onMove func
onStop func
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.

Directions

License

This software is released under the MIT License.

Links

Current Tags

  • 3.0.11                                ...           latest (4 years ago)

43 Versions

  • 3.0.11                                ...           4 years ago
  • 3.0.10                                ...           4 years ago
  • 3.0.9                                ...           4 years ago
  • 3.0.8                                ...           4 years ago
  • 3.0.7                                ...           4 years ago
  • 3.0.6                                ...           4 years ago
  • 3.0.5                                ...           4 years ago
  • 3.0.4                                ...           4 years ago
  • 3.0.3                                ...           4 years ago
  • 3.0.2                                ...           4 years ago
  • 3.0.1                                ...           4 years ago
  • 3.0.0                                ...           4 years ago
  • 2.1.12                                ...           4 years ago
  • 2.1.11                                ...           4 years ago
  • 2.1.10                                ...           4 years ago
  • 2.1.9                                ...           4 years ago
  • 2.1.8                                ...           4 years ago
  • 2.1.7                                ...           4 years ago
  • 2.1.6                                ...           4 years ago
  • 2.1.5                                ...           4 years ago
  • 2.1.4                                ...           4 years ago
  • 2.1.3                                ...           4 years ago
  • 2.1.2                                ...           4 years ago
  • 2.1.1                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.4                                ...           5 years ago
  • 2.0.3                                ...           5 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.12                                ...           5 years ago
  • 1.0.11                                ...           5 years ago
  • 1.0.10                                ...           5 years ago
  • 1.0.9                                ...           5 years ago
  • 1.0.8                                ...           5 years ago
  • 1.0.7                                ...           5 years ago
  • 1.0.6                                ...           5 years ago
  • 1.0.5                                ...           5 years ago
  • 1.0.4                                ...           5 years ago
  • 1.0.3                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 86
Dependencies (8)
Dev Dependencies (25)

Copyright 2014 - 2016 © taobao.org |