Skip to content

Commit

Permalink
Merge pull request #30 from skomputer/firefoxFix
Browse files Browse the repository at this point in the history
Draggable element fix for FireFox
  • Loading branch information
jessp authored Aug 2, 2016
2 parents 70d193e + 4705d8d commit 97afcc6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/components/Caption.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default class Caption extends BaseComponent {
}

_handleDragStart(e, ui) {
e.preventDefault();
this._startDrag = ui.position;
this._startPosition = {
x: this.state.x,
Expand Down
1 change: 1 addition & 0 deletions app/components/Edge.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export default class Edge extends BaseComponent {
}

_handleDragStart(event, ui) {
event.preventDefault();
this._startDrag = ui.position;
this._startPosition = {
x: this.state.cx,
Expand Down
3 changes: 2 additions & 1 deletion app/components/Node.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default class Node extends BaseComponent {
moveOnStartChange={false}
onStart={this._handleDragStart}
onDrag={this._handleDrag}
onStop={this._handleDragStop}>
onStop={this._handleDragStop} >
<g
id={groupId}
className="node"
Expand All @@ -53,6 +53,7 @@ export default class Node extends BaseComponent {

// keep initial position for comparison with drag position
_handleDragStart(e, ui) {
e.preventDefault();
this._startDrag = ui.position;
this._startPosition = {
x: this.state.x,
Expand Down

0 comments on commit 97afcc6

Please sign in to comment.