Skip to content

Commit

Permalink
Update docs index
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed May 11, 2015
1 parent 987d50b commit 3ac10dd
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 27 deletions.
4 changes: 0 additions & 4 deletions docs/DragDrop.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/DragDropContext.md
@@ -1,4 +1,4 @@
`@DragDropContext`
`DragDropContext`
=========================

Lol.
2 changes: 1 addition & 1 deletion docs/DragDropLayer.md → docs/DragLayer.md
@@ -1,4 +1,4 @@
`@DragDropLayer`
`DragLayer`
===================

Lol.
8 changes: 6 additions & 2 deletions docs/index.md
Expand Up @@ -16,15 +16,19 @@ HTML5 drag and drop has an awkward API full of pitfalls and browser inconsistenc

### It is extensible and testable

React DnD uses the HTML5 drag and drop under the hood, but it also lets you supply a custom engine. You can create a custom DnD engine based on the touch events, the mouse events, or something else entirely. For example, a built-in simulation engine lets you test drag and drop interaction of your components in a Node environment.
React DnD uses the HTML5 drag and drop under the hood, but it also lets you supply a custom “backend”. You can create a custom DnD backend based on the touch events, the mouse events, or something else entirely. For example, a built-in simulation backend lets you test drag and drop interaction of your components in a Node environment.

### It is ready for the future

React DnD does not export mixins, and works equally great with any components, whether they are created using ES6 classes, `createClass` or alternative React frameworks such as Omniscient. Its API shines with ES7 decorators if you like to be on the bleeding edge, but it also feels natural in both ES5 and ES6.

## Touch Support

React DnD does not work on mobile browsers yet because it currently relies on the HTML5 drag and drop API which no mobile browsers implement. However, because React DnD is extensible, it is possible to add touch support using a custom backend [with about 200 lines of code](https://github.com/gaearon/react-dnd/blob/ba8359ab3d7c76592357e078561d0e9d96afbcb0/src/backends/Touch.js). This is currently a proof of concept, but any contributions in this direction are welcome. Touch support will be a priority for the upcoming 1.x releases.

## Non-Goals

React DnD gives a set of powerful primitives, but it does not contain any readymade components. It provides you a lower level of abstraction than [jQuery UI](https://jqueryui.com/) or [interact.js](http://interactjs.io/) and is focused on getting the drag and drop interaction right, leaving its visual aspects such as axis constraints and snapping to you. For example, React DnD doesn't plan to provide a `Sortable` component, but it makes it easy to build your own with any rendering customizations you need.
React DnD gives a set of powerful primitives, but it does not contain any readymade components. It provides you a lower level of abstraction than [jQuery UI](https://jqueryui.com/) or [interact.js](http://interactjs.io/) and is focused on getting the drag and drop interaction right, leaving its visual aspects such as axis constraints or snapping to you. For example, React DnD doesn't plan to provide a `Sortable` component, but it makes it easy to build your own with any rendering customizations that you need.

## Installation

Expand Down
26 changes: 11 additions & 15 deletions site/Constants.js
Expand Up @@ -12,25 +12,21 @@ exports.Pages = {
};

exports.APIPages = {
DRAG_DROP: {
location: 'api-drag-drop.html',
title: '@DragDrop'
},
DRAG_DROP_CONTEXT: {
location: 'api-drag-drop-context.html',
title: '@DragDropContext'
},
DRAG_DROP_LAYER: {
location: 'api-drag-drop-layer.html',
title: '@DragDropLayer'
},
DRAG_SOURCE: {
location: 'api-drag-source.html',
title: 'Drag Source Spec'
title: 'DragSource'
},
DROP_TARGET: {
location: 'api-drop-target.html',
title: 'Drop Target Spec'
title: 'DropTarget'
},
DRAG_LAYER: {
location: 'api-drag-layer.html',
title: 'DragLayer'
},
DRAG_DROP_CONTEXT: {
location: 'api-drag-drop-context.html',
title: 'DragDropContext'
},
DRAG_SOURCE_MONITOR: {
location: 'api-drag-source-monitor.html',
Expand All @@ -50,4 +46,4 @@ exports.APIPages = {
}
};

exports.DOCS_DEFAULT = exports.APIPages.DRAG_DROP;
exports.DOCS_DEFAULT = exports.APIPages.DRAG_SOURCE;
7 changes: 3 additions & 4 deletions site/IndexPage.js
Expand Up @@ -14,14 +14,13 @@ var APIPages = Constants.APIPages;
var Pages = Constants.Pages;

var APIDocs = {
DRAG_DROP: require('../docs/DragDrop.md'),
DRAG_DROP_CONTEXT: require('../docs/DragDropContext.md'),
DRAG_DROP_LAYER: require('../docs/DragDropLayer.md'),
DRAG_DROP_MONITOR: require('../docs/DragDropMonitor.md'),
DRAG_SOURCE: require('../docs/DragSource.md'),
DRAG_SOURCE_MONITOR: require('../docs/DragSourceMonitor.md'),
DROP_TARGET: require('../docs/DropTarget.md'),
DROP_TARGET_MONITOR: require('../docs/DropTargetMonitor.md'),
DRAG_DROP_CONTEXT: require('../docs/DragDropContext.md'),
DRAG_LAYER: require('../docs/DragLayer.md'),
DRAG_DROP_MONITOR: require('../docs/DragDropMonitor.md'),
HTML5: require('../docs/HTML5.md')
};

Expand Down

0 comments on commit 3ac10dd

Please sign in to comment.