Skip to content

Commit e982b26

Browse files
committed
Merge pull request #76 from meikidd/master
fix x/y position when axis limit is enabled
2 parents a781374 + 29b0c8e commit e982b26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/draggable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,12 +671,12 @@ module.exports = React.createClass({
671671
// Set left if horizontal drag is enabled
672672
x: canDragX(this) ?
673673
this.state.clientX :
674-
0,
674+
this.props.start.x,
675675

676676
// Set top if vertical drag is enabled
677677
y: canDragY(this) ?
678678
this.state.clientY :
679-
0
679+
this.props.start.y
680680
});
681681

682682
// Workaround IE pointer events; see #51

0 commit comments

Comments
 (0)