Skip to content

Commit

Permalink
Minor doc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed May 17, 2015
1 parent f9b46c6 commit d2a71b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/03 Monitoring State/DragSourceMonitor.md
Expand Up @@ -7,17 +7,17 @@ DragSourceMonitor

### Methods

* **`canDrag()`**: Returns `true` if no drag operation is in progress, and the owner's `canDrag()` is either not defined, or returns `true`.
* **`canDrag()`**: Returns `true` if no drag operation is in progress, and the owner's `canDrag()` returns `true` or is not defined.

* **`isDragging()`**: Returns `true` if there is a drag operation is in progress, and either the owner initiated the drag, or its `isDragging()` function is either not defined, or returns `true`.
* **`isDragging()`**: Returns `true` if there is a drag operation is in progress, and either the owner initiated the drag, or its `isDragging()` is defined and returns `true`.

* **`getItemType()`**: Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns `null` if no item is being dragged.

* **`getItem()`**: Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from its `beginDrag()` method. Returns `null` if no item is being dragged.

* **`getDropResult()`**: Returns a plain object representing the last recorded drop result. Some drop targets may optionally specify it by returning an object from their `drop()` methods. When a chain of `drop()` is dispatched for the nested targets, bottom up, any parent that explicitly returns its own result from `drop()` overrides the child drop result. Returns `null` if called before the first target's `drop()` is dispatched, or after the source's `endDrag` is dispatched.
* **`getDropResult()`**: Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an object from their `drop()` methods. When a chain of `drop()` is dispatched for the nested targets, bottom up, any parent that explicitly returns its own result from `drop()` overrides the child drop result previously set by the child. Returns `null` if called outside `endDrag()`.

* **`didDrop()`** Returns `true` if any drop target has received the drop event. Even if a target did not return a drop result, `didDrop()` will return `true`. Returns `false` if no targets have received a `drop()` event. Also returns `false` if called before the first target's `drop()` is dispatched, or after the source's `endDrag` is dispatched.
* **`didDrop()`** Returns `true` if some drop target has handled the drop event, `false` otherwise. Even if a target did not return a drop result, `didDrop()` returns `true`. Use it inside `endDrag()` to test whether any drop target has handled the drop. Returns `false` if called outside `endDrag()`.

* **`getInitialClientOffset()`**: Returns the `{ x, y }` client offset of the pointer at the time when the current drag operation has started. Returns `null` if no item is being dragged.

Expand Down
6 changes: 3 additions & 3 deletions docs/03 Monitoring State/DropTargetMonitor.md
Expand Up @@ -7,17 +7,17 @@ DropTargetMonitor

### Methods

* **`canDrop()`**: Returns `true` if no drag operation is in progress, and the owner's `canDrop()` is either not defined, or returns `true`.
* **`canDrop()`**: Returns `true` if no drag operation is in progress, and the owner's `canDrop()` returns `true` or is not defined.

* **`isOver(options)`**: Returns `true` if there is a drag operation is in progress, and the pointer is currently hovering over the owner. You may optionally pass `{ shallow: true }` to strictly check whether *only* the owner is being hovered, as opposed to a nested target.

* **`getItemType()`**: Returns a string or an ES6 symbol identifying the type of the current dragged item. Returns `null` if no item is being dragged.

* **`getItem()`**: Returns a plain object representing the currently dragged item. Every drag source must specify it by returning an object from its `beginDrag()` method. Returns `null` if no item is being dragged.

* **`getDropResult()`**: Returns a plain object representing the last recorded drop result. Some drop targets may optionally specify it by returning an object from their `drop()` methods. When a chain of `drop()` is dispatched for the nested targets, bottom up, any parent that explicitly returns its own result from `drop()` overrides the child drop result. Returns `null` if called before the first target's `drop()` is dispatched, or after the source's `endDrag` is dispatched.
* **`getDropResult()`**: Returns a plain object representing the last recorded drop result. The drop targets may optionally specify it by returning an object from their `drop()` methods. When a chain of `drop()` is dispatched for the nested targets, bottom up, any parent that explicitly returns its own result from `drop()` overrides the drop result previously set by the child. Returns `null` if called outside `drop()`.

* **`didDrop()`** Returns `true` if any drop target has received the drop event. Even if a target did not return a drop result, `didDrop()` will return `true`. Returns `false` if no targets have received a `drop()` event. Also returns `false` if called before the first target's `drop()` is dispatched, or after the source's `endDrag` is dispatched.
* **`didDrop()`** Returns `true` if some drop target has handled the drop event, `false` otherwise. Even if a target did not return a drop result, `didDrop()` returns `true`. Use it inside `drop()` to test whether any nested drop target has already handled the drop. Returns `false` if called outside `drop()`.

* **`getInitialClientOffset()`**: Returns the `{ x, y }` client offset of the pointer at the time when the current drag operation has started. Returns `null` if no item is being dragged.

Expand Down

0 comments on commit d2a71b6

Please sign in to comment.