react-dnd
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -354,7 +354,5 @@ 'use strict'; | ||
if (acceptDrop) { | ||
acceptDrop(item, e); | ||
if (!acceptDrop || acceptDrop(item, e) !== false) { | ||
DragDropActionCreators.recordDrop(); | ||
} | ||
DragDropActionCreators.recordDrop(); | ||
} | ||
@@ -361,0 +359,0 @@ }; |
{ | ||
"name": "react-dnd", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "HTML5 drag and drop mixin for React with full DOM control", | ||
@@ -5,0 +5,0 @@ "main": "modules/index.js", |
@@ -249,3 +249,3 @@ react-dnd | ||
* `endDrag(didDrop)` — optionally handle end of dragging operation. | ||
* `endDrag(didDrop)` — optionally handle end of dragging operation. `didDrop` is `false` if item was dropped outside compatible drop targets, or if drop target returned `false` from `acceptDrop`. | ||
@@ -259,5 +259,7 @@ =================== | ||
* `enter(item)`, `leave(item)`, `over(item)` — optionally implement these to perform side effects (e.g. might use `over` for reordering items when they overlap). If you need to render different states when drop target is active or hovered, it is easier to use `this.getDropState(type)` in `render` method. | ||
* `canDrop(item)` — optionally implement this method to reject some of the items | ||
* `acceptDrop(item)` — optionally implement this method to perform some action when drop occurs. | ||
* `canDrop(item)` — optionally implement this method to reject some of the items. | ||
* `acceptDrop(item)` — optionally implement this method to perform some action when drop occurs. If you explicitly return `false`, drop source will receive `false` as `didDrop` argument. | ||
=================== | ||
@@ -273,8 +275,4 @@ | ||
## Known Issues | ||
* [Image previews seem to have incorrect offsets on Safari 8](https://github.com/gaearon/react-dnd/issues/1) | ||
## Thanks | ||
This library is a React port of an API, parts of which were originally written by [Andrew Kuznetsov](http://github.com/cavinsmith/). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26915
469
276