1.0.4 • Published 5 months ago

react-alignment-guides v1.0.4

Weekly downloads
196
License
Apache-2.0
Repository
github
Last release
5 months ago

react-alignment-guides

React Alignment Guides is a guides system for draggable elements in an enclosed space

NPM JavaScript Style Guide

Install

NPM

npm install --save react-alignment-guides

Usage

import React, { Component } from 'react'

import AlignmentGuides from 'react-alignment-guides'

class Example extends Component {
  render () {
    return (
      <AlignmentGuides {...props} />
    )
  }
}

Props

PropRequiredDefaultDescription
boxestrue[]An array of box objects
boxStylefalse{}Styles to be applied to the boxes. It should follow the convention described here.
classNamefalseempty stringCSS classes. Note: Do not override position
onDragStartfalseFunction to call when drag starts
onDragfalseFunction to call during drag
onDragEndfalseFunction to call when drag ends
onKeyUpfalseFunction to call for keystrokes
onResizeStartfalseFunction to call when resize starts
onResizefalseFunction to call during resize
onResizeEndfalseFunction to call when resize ends
onSelectfalseFunction to call when a box is clicked
onUnselectfalseFunction to call when a box goes inactive
onSecondaryClickfalseFunction to call when right clicking on single or multiple boxes
resolutionfalsenullResolution to which you want to scale the boxes to. For example, the bounding box can be 1280x720 but you can display the coordinates and dimensions relative to 1920x1080. In this case, resolution would be set to { width: 1920, height: 1080 }.
stylefalsenullStyles to be applied to the component. It should follow the convention described here. Note: Do not override position

Box object

PropDefaultDescription
dragtrueBoolean. Allow or disallow dragging for this box
resizetrueBoolean. Allow or disallow resizing for this box
rotatetrueBoolean. Allow or disallow rotating for this box
xNumber
yNumber
leftNumber
topNumber
widthNumber
heightNumber
rotateAngleNumber in the range -180 to 180

License

Apache-2.0 © Rocketium

1.0.4

5 months ago

1.0.3

7 months ago

1.0.2

8 months ago

1.0.1-rc.28

1 year ago

1.0.1-rc.26

1 year ago

1.0.1-rc.27

1 year ago

1.0.1-rc.24

2 years ago

1.0.1-rc.25

2 years ago

1.0.1-rc.22

2 years ago

1.0.1-rc.23

2 years ago

1.0.1-rc.20

2 years ago

1.0.1-rc.21

2 years ago

1.0.1-rc.18

2 years ago

1.0.1-rc.19

2 years ago

1.0.1-rc.17

2 years ago

1.0.1-rc.13

2 years ago

1.0.1-rc.14

2 years ago

1.0.1-rc.15

2 years ago

1.0.1-rc.16

2 years ago

1.0.1-rc.12

2 years ago

1.0.1-rc.11

2 years ago

1.0.1-rc.9

2 years ago

1.0.1-rc.10

2 years ago

1.0.1-rc.7

3 years ago

1.0.1-rc.6

3 years ago

1.0.1-rc.8

2 years ago

1.0.1-rc.5

3 years ago

1.0.1-rc.4

3 years ago

1.0.1-rc.3

3 years ago

1.0.1-rc.2

3 years ago

1.0.1-rc.1

3 years ago

1.0.0-rc.46

3 years ago

1.0.0-rc.45

3 years ago

1.0.0-rc.44

3 years ago

1.0.0-rc.43

3 years ago

1.0.0-rc.42

3 years ago

1.0.0-rc.41

3 years ago

1.0.0-rc.40

3 years ago

1.0.0-rc.39

3 years ago

1.0.0-rc.38

3 years ago

1.0.0-rc.37

3 years ago

1.0.0-rc.36

3 years ago

1.0.0-rc.35

3 years ago

1.0.0-rc.34

3 years ago

1.0.0-rc.33

3 years ago

1.0.0-rc.32

3 years ago

1.0.0-rc.31

3 years ago

1.0.0-rc.30

3 years ago

1.0.0-rc.29

3 years ago

1.0.0-rc.28

3 years ago

1.0.0-rc.27

3 years ago

1.0.0-rc.26

3 years ago

1.0.0-rc.17

3 years ago

1.0.0-rc.19

3 years ago

1.0.0-rc.18

3 years ago

1.0.0-rc.20

3 years ago

1.0.0-rc.24

3 years ago

1.0.0-rc.23

3 years ago

1.0.0-rc.22

3 years ago

1.0.0-rc.21

3 years ago

1.0.0-rc.25

3 years ago

1.0.0-rc.16

3 years ago

1.0.0-rc.13

3 years ago

1.0.0-rc.12

3 years ago

1.0.0-rc.11

3 years ago

1.0.0-rc.15

3 years ago

1.0.0-rc.14

3 years ago

1.0.0-rc.10

3 years ago

1.0.0-rc.9

3 years ago

1.0.0-rc.8

3 years ago

1.0.0-rc.7

3 years ago

1.0.0-rc.6

3 years ago

1.0.0-rc.5

3 years ago

1.0.0-rc.4

4 years ago

1.0.0-rc.3

4 years ago

1.0.0-alpha.19

4 years ago

1.0.0-rc.1

4 years ago

1.0.0-rc.2

4 years ago

1.0.0-alpha.18

4 years ago

1.0.0-alpha.17

4 years ago

1.0.0-alpha.16

4 years ago

1.0.0-alpha.15

4 years ago

1.0.0-alpha.14

4 years ago

1.0.0-alpha.13

4 years ago

1.0.0-alpha.12

4 years ago

1.0.0-alpha.11

4 years ago

1.0.0-alpha.10

4 years ago

1.0.0-alpha.9

4 years ago

1.0.0-alpha.8

4 years ago

1.0.0-alpha.7

4 years ago

1.0.0-alpha.6

4 years ago

1.0.0-alpha.5

5 years ago

1.0.0-alpha.4

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0-alpha.2

5 years ago

1.0.0-alpha.1

5 years ago

1.0.0-alpha

5 years ago

0.14.1

5 years ago

0.14.0

5 years ago

0.13.3

5 years ago

0.13.2

5 years ago

0.13.1

5 years ago

0.13.0

5 years ago

0.12.6

5 years ago

0.12.5

5 years ago

0.12.4

5 years ago

0.12.3

5 years ago

0.12.2

5 years ago

0.12.1

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago