3.0.11 • Published 9 years ago

apeman-react-draggable v3.0.11

Weekly downloads
28
License
MIT
Repository
github
Last release
9 years ago

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

NameTypeDefaultDescription
styleobject{}

ApDraggable

Props

NameTypeDefaultDescription
onStartfuncHandler for drag start
onMovefuncHandler for drag move
onStopfuncHandler for drag stop
shouldMovefuncfunction() {

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

NameTypeDefaultDescription
onStartfunctionCallback when drag started.
onMovefunctionCallback when drag moved.
onStopfunctionCallback when drag stopped.
shouldMovefunctionCalled when drag moved. Returns false to cancel moving.
directionstringMove direction.
xnumberX position.
minXnumberMIN_SAFE_INTEGERMin x position.
maxXnumberMAX_SAFE_INTEGERMax x position.
ynumberY potion.
minYnumberMIN_SAFE_INTEGERMin y position.
maxYnumberMAX_SAFE_INTEGERMax y position.

Directions

License

This software is released under the MIT License.

Links

3.0.11

9 years ago

3.0.10

9 years ago

3.0.9

9 years ago

3.0.8

9 years ago

3.0.7

9 years ago

3.0.6

9 years ago

3.0.5

9 years ago

3.0.4

9 years ago

3.0.3

9 years ago

3.0.2

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.1.12

9 years ago

2.1.11

9 years ago

2.1.10

9 years ago

2.1.9

9 years ago

2.1.8

9 years ago

2.1.7

9 years ago

2.1.6

9 years ago

2.1.5

9 years ago

2.1.4

9 years ago

2.1.3

9 years ago

2.1.2

9 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.4

10 years ago

2.0.3

10 years ago

2.0.2

10 years ago

2.0.1

10 years ago

2.0.0

10 years ago

1.0.12

10 years ago

1.0.11

10 years ago

1.0.10

10 years ago

1.0.9

10 years ago

1.0.8

10 years ago

1.0.7

10 years ago

1.0.6

10 years ago

1.0.5

10 years ago

1.0.4

10 years ago

1.0.3

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago