react-draggable
Advanced tools
Changelog
2.0.0-beta2 (Apr 14, 2016)
<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.
<Draggable>
controlled but attach no callback
handlers, a warning will be printed.Changelog
2.0.0-beta1 (Apr 14, 2016)
<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
};
start
option has been renamed to defaultPosition
.zIndex
option has been removed.offsetParent
.
This method allows us to support arbitrary nested scrollable ancestors without scroll handlers!
<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.Changelog
1.4.0-beta1 (Apr 13, 2016)
Changelog
1.3.7 (Apr 8, 2016)
user-select
prefixing, which may be different than the prefix required for transform
.Changelog
1.3.4 (Mar 5, 2016)
Changelog
1.3.3 (Feb 11, 2016)
Changelog
1.3.1 (Feb 10, 2016)
Changelog
1.3.0 (Feb 10, 2016)
<Draggable>
fires drag
events, as they should have been.'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.