Skip to content

Commit

Permalink
0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Mar 2, 2015
1 parent 602023a commit 73e44f6
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "react-dnd",
"version": "0.9.2",
"version": "0.9.3",
"homepage": "https://github.com/gaearon/react-dnd",
"authors": [
"Dan Abramov <dan.abramov@me.com>"
Expand Down
12 changes: 11 additions & 1 deletion dist-modules/backends/HTML5.js
Expand Up @@ -10,6 +10,8 @@ var DragDropActionCreators = require("../actions/DragDropActionCreators"),
shallowEqual = require("react/lib/shallowEqual"),
isWebkit = require("../utils/isWebkit");

var ELEMENT_NODE = 1;

// Store global state for browser-specific fixes and workarounds
var _monitor = new EnterLeaveMonitor(),
_currentDragTarget,
Expand All @@ -19,6 +21,14 @@ var _monitor = new EnterLeaveMonitor(),
_currentDropEffect;

function getElementRect(el) {
if (el.nodeType !== ELEMENT_NODE) {
el = el.parentElement;
}

if (!el) {
return null;
}

var rect = el.getBoundingClientRect();
// Copy so object doesn't get reused
return { top: rect.top, left: rect.left, width: rect.width, height: rect.height };
Expand Down Expand Up @@ -61,7 +71,7 @@ function preventDefaultNativeDropAction(e) {

function handleTopDragStart(e) {
// If by this time no drag source reacted, tell browser not to drag.
if (!DragOperationStore.isDragging()) {
if (!isNativeDragDropEvent(e) && !DragOperationStore.isDragging()) {
e.preventDefault();
}
}
Expand Down
2 changes: 1 addition & 1 deletion dist/ReactDND.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions examples/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion examples/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-dnd",
"version": "0.9.2",
"version": "0.9.3",
"description": "Drag and drop for React with full DOM control",
"main": "dist-modules/index.js",
"scripts": {
Expand Down

0 comments on commit 73e44f6

Please sign in to comment.