5.0/58

react-draggable

npm i react-draggable

78 Versions

4.4.5

latest
3 months ago

4.4.4

1 year ago

4.4.3

2 years ago

4.4.2

2 years ago

4.4.1

2 years ago

4.4.0

2 years ago

4.3.1

2 years ago

4.3.0

2 years ago

4.2.0

3 years ago

4.1.0

3 years ago

4.0.3

3 years ago

4.0.2

3 years ago

4.0.1

3 years ago

3.3.2

3 years ago

3.3.1

3 years ago

3.3.0

3 years ago

3.2.1

3 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.2.6

5 years ago

2.2.5

5 years ago

2.2.4

5 years ago

2.2.3

6 years ago
  • Bugfix: Fix an issue with the entire window scrolling on a drag on iDevices. Thanks @JaneCoder. See #183

2.2.2

6 years ago
  • Bugfix: Fix references to global when grabbing SVGElement, see #162
  • Bugfix: Get ownerDocument before onStop, fixes #198

2.2.1

6 years ago
  • Bugfix: Fix getComputedStyle error: see #186, #190

2.2.0

6 years ago

2.1.2

6 years ago
  • Bugfix: Fix return false to cancel onDrag breaking on both old and new browsers due to missing typeArg and/or unsupported MouseEventConstructor. Fixes #164.

2.1.1

6 years ago
  • Bugfix: <DraggableCore> wasn't calling back with the DOM node.
  • Internal: Rework test suite to use power-assert.

2.1.0

6 years ago
  • Fix improperly missed handle or cancel selectors if the event originates from a child of the handle or cancel.
    • Fixes a longstanding issue, #88
    • This was pushed to a minor release as there may be edge cases (perhaps workarounds) where this changes behavior.

2.0.2

6 years ago
  • Fix cannot access clientX of undefined on some touch-enabled platforms.
  • Fixed a bug with multi-finger multitouch if > 1 finger triggered an event at the same time.

2.0.1

6 years ago
  • Finally fixed the IE10 constructor bug. Thanks @davidstubbs #158

2.0.0

6 years ago
  • This is a breaking change. See the changes below in the beta releases.
    • Note the changes to event callbacks and position / defaultPosition.
  • Changes from 2.0.0-beta3:
    • Small bugfixes for Flow 0.24 compatibility.
    • Don't assume global.SVGElement. Fixes JSDOM & #123.

2.0.0-beta3

6 years ago
  • Flow comments are now in the build. Other projects, such as React-Grid-Layout and React-Resizable, will rely on them in their build and export their own comments.

2.0.0-beta2

6 years ago
  • We're making a small deviation from React Core's controlled vs. uncontrolled scheme; for convenience, <Draggable>s with a position property will still be draggable, but will revert to their old position on drag stop. Attach an onStop or onDrag handler to synchronize state.
    • A warning has been added informing users of this. If you make <Draggable> controlled but attach no callback handlers, a warning will be printed.

2.0.0-beta1

6 years ago
  • Due to API changes, this is a major release.
Breaking Changes:
  • Both <DraggableCore> and <Draggable> have had their callback types changed and unified.
type DraggableEventHandler = (e: Event, data: DraggableData) => void | false;
type DraggableData = {
  node: HTMLElement,
  // lastX + deltaX === x
  x: number, y: number,
  deltaX: number, deltaY: number,
  lastX: number, lastY: number
};
  • The start option has been renamed to defaultPosition.
  • The zIndex option has been removed.
Possibly Breaking Changes:
  • When determining deltas, we now use a new method that checks the delta against the Draggable's offsetParent. This method allows us to support arbitrary nested scrollable ancestors without scroll handlers!
    • This may cause issues in certain layouts. If you find one, please open an issue.
Enhancements:
  • <Draggable> now has a position attribute. Its relationship to defaultPosition is much like value to defaultValue on React <input> nodes. If set, the position is fixed and cannot be mutated. If empty, the component will manage its own state. See #140 for more info & motivations.
  • Misc. bugfixes.

1.4.0-beta1

6 years ago
  • Major improvements to drag tracking that now support even nested scroll boxes.
    • This revision is being done as a pre-release to ensure there are no unforeseen issues with the offset changes.

1.3.7

6 years ago
  • Fix user-select prefixing, which may be different than the prefix required for transform.

1.3.6

6 years ago
  • Republished after 1.3.5 contained a bundling error.

1.3.4

6 years ago
  • Bugfix: Scrolling while dragging caused items to move unpredictably.

1.3.3

6 years ago
  • Bugfix: #116: Android/Chrome are finicky; give up on canceling ghost clicks entirely.

1.3.2

6 years ago
  • Bugfix: #116: Child inputs not focusing on touch events.

1.3.1

6 years ago
  • Internal: Babel 6 and Flow definitions
  • Bugfix: 1.3.0 broke string bounds ('parent', selectors, etc.).
  • Bugfix: 1.3.0 wasn't updating deltaX and deltaY on a bounds hit.

1.3.0

6 years ago
  • Possibly breaking change: bounds are calculated before <Draggable> fires drag events, as they should have been.
  • Added 'none' axis type. This allows using <Draggable> somewhat like <DraggableCore> - state will be kept internally (which makes bounds checks etc possible), but updates will not be flushed to the DOM.
  • Performance tweaks.

1.2.0

7 years ago
  • Added arbitrary boundary selector. Now you don't have to just use 'parent', you can select any element on the page, including 'body'.
  • Bugfix: Prevent invariant if a <Draggable> is unmounted while dragging.
  • Bugfix: Fix #133, where items would eagerly start dragging off the mouse cursor if you hit boundaries and came back. This is due to how <DraggableCore> handles deltas only and does not keep state. Added new state properties slackX and slackY to <Draggable> to handle this and restore pre-v1 behavior.

1.1.3

7 years ago
  • Bugfix: Server-side rendering with react-rails, which does bad things like mock window

1.1.2

7 years ago
  • Bugfix: <Draggable> was calling back with clientX/Y, not offsetX/Y as it did pre-1.0. This unintended behavior has been fixed and a test has been added.

1.1.1

7 years ago
  • Bugfix: Clean up scroll events if a component is unmounted before drag stops.
  • Bugfix: NaN was returning from scroll events due to event structure change.
  • Add scroll drag modulation test.

1.1.0

7 years ago
  • Move grid into <DraggableCore> directly. It will continue to work on <Draggable>.
  • Development fixes.

1.0.2

7 years ago
  • Fix enableUserSelectHack not properly disabling.
  • Fix a crash when the user scrolls the page with a Draggable active.

1.0.1

7 years ago
  • Fix missing dist files for webpack.
  • Ignore non-primary clicks. Added allowAnyClick option to allow other click types.

1.0.0

7 years ago
  • Breaking: Removed resetState() instance method
  • Breaking: Removed moveOnStartChange prop
  • Breaking: React 0.14 support only.
  • Refactored project.
  • Module now exports a <DraggableCore> element upon which <Draggable> is based. This module is useful for building libraries and is completely stateless.

0.8.5

7 years ago
  • Bugfix: isElementSVG no longer can be overwritten by getInitialState (#83)
  • Bugfix: Fix for element prefixes in JSDOM

0.8.4

7 years ago
  • Bugfix: SVG elements now properly use transform attribute instead of style. Thanks @martinRoss

0.8.3

7 years ago
  • Bugfix: Short-circuiting drag throws due to e.changedTouches check.

0.8.2

7 years ago
  • Handle scrolling while dragging. (#60)
  • Add multi-touch support. (#68)
  • IE fixes.
  • Documentation updates. (#77)

0.8.1

7 years ago
  • Add resetState() instance method for use by parents. See README ("State Problems?").

0.8.0

7 years ago
  • Touch/mouse events rework. Fixes #51, #37, and #43, as well as IE11 support.
  • Moved mousemove/mouseup and touch event handlers to document from window. Fixes IE9/10 support. IE8 is still not supported, as it is not supported by React.

0.7.4

7 years ago
  • Fix a bug where a quick drag out of bounds to 0,0 would cause the element to remain in an inaccurate position, because the translation was removed from the CSS. See #55.

0.7.3

7 years ago

0.7.2

7 years ago
  • Added moveOnStartChange property. See README.

0.7.1

7 years ago
  • The start param is back. Pass {x: Number, y: Number} to kickoff the CSS transform. Useful in certain cases for simpler callback math (so you don't have to know its existing relative position and add it to the dragged position). Fixes #52.

0.7.0

7 years ago
  • Breaking change: bounds with coordinates was confusing because it was using the item's width/height, which was not intuitive. When providing coordinates, bounds now simply restricts movement in each direction by that many pixels.

0.6.0

7 years ago
  • Breaking change: Cancel dragging when onDrag or onStart handlers return an explicit false.
  • Fix sluggish movement when grid option was active.
  • Example updates.
  • Move user-select:none hack to document.body for better highlight prevention.
  • Add bounds option to restrict dragging within parent or within coordinates.

0.5.0

7 years ago
  • Remove browserify browser config, reactify, and jsx pragma. Fixes #38
  • Use React.cloneElement instead of addons cloneWithProps (requires React 0.13)
  • Move to CSS transforms. Simplifies implementation and fixes #48, #34, #31.
  • Fixup linting and space/tab errors. Fixes #46.

0.4.2

7 years ago
  • Add "browser" config to package.json for browserify imports (fix #45).
  • Remove unnecessary emptyFunction and React.addons.classSet imports.

0.4.1

7 years ago
  • Remove react/addons dependency (now depending on react directly).
  • Add MIT License file.
  • Fix an issue where browser may be detected as touch-enabled but touch event isn't thrown.

0.4.0

8 years ago
  • Improving accuracy of snap to grid
  • Updating to React 0.12
  • Adding dragging className
  • Adding reactify support for browserify
  • Fixing issue with server side rendering

0.3.0

8 years ago
  • Adding support for touch devices

0.2.1

8 years ago
  • Exporting as ReactDraggable

0.2.0

8 years ago
  • Adding support for snapping to a grid
  • Adding support for specifying start position
  • Ensure event handlers are destroyed on unmount
  • Adding browserify support
  • Adding bower support

0.1.1

8 years ago
  • Fixing dragging not stopping on mouseup in some cases

0.1.0

8 years ago
  • Initial release

78 Versions

TagPublished
4.4.5latest3mos ago
4.4.41yr ago
4.4.32yrs ago
4.4.22yrs ago
4.4.12yrs ago
4.4.02yrs ago
4.3.12yrs ago
4.3.02yrs ago
4.2.03yrs ago
4.1.03yrs ago
4.0.33yrs ago
4.0.23yrs ago
4.0.13yrs ago
3.3.23yrs ago
3.3.13yrs ago
3.3.03yrs ago
3.2.13yrs ago
3.1.14yrs ago
3.1.04yrs ago
3.0.55yrs ago
3.0.45yrs ago
3.0.35yrs ago
3.0.25yrs ago
3.0.15yrs ago
3.0.05yrs ago
2.2.65yrs ago
2.2.55yrs ago
2.2.45yrs ago
2.2.36yrs ago
2.2.26yrs ago
2.2.16yrs ago
2.2.06yrs ago
2.1.26yrs ago
2.1.16yrs ago
2.1.06yrs ago
2.0.26yrs ago
2.0.16yrs ago
2.0.06yrs ago
2.0.0-beta36yrs ago
2.0.0-beta26yrs ago
2.0.0-beta16yrs ago
1.4.0-beta16yrs ago
1.3.76yrs ago
1.3.66yrs ago
1.3.46yrs ago
1.3.36yrs ago
1.3.26yrs ago
1.3.16yrs ago
1.3.06yrs ago
1.2.07yrs ago
1.1.37yrs ago
1.1.27yrs ago
1.1.17yrs ago
1.1.07yrs ago
1.0.27yrs ago
1.0.17yrs ago
1.0.07yrs ago
0.8.57yrs ago
0.8.47yrs ago
0.8.37yrs ago
0.8.27yrs ago
0.8.17yrs ago
0.8.07yrs ago
0.7.47yrs ago
0.7.37yrs ago
0.7.27yrs ago
0.7.17yrs ago
0.7.07yrs ago
0.6.07yrs ago
0.5.07yrs ago
0.4.27yrs ago
0.4.17yrs ago
0.4.08yrs ago
0.3.08yrs ago
0.2.18yrs ago
0.2.08yrs ago
0.1.18yrs ago
0.1.08yrs ago