How to use the react-dnd.DropEffects function in react-dnd

To help you get started, we’ve selected a few react-dnd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rsamec / react-designer / src / app / components / Box.js View on Github external
'use strict';

var React = require('react'),
    PropTypes = React.PropTypes,
    ItemTypes = require('./ItemTypes'),
    DragDropMixin =require('react-dnd').DragDropMixin,
    DropEffects = require('react-dnd').DropEffects,
    ResizableHandle=require('./ResizableHandle');

var Box = React.createClass({
    mixins: [DragDropMixin],

    propTypes: {
        index:PropTypes.number.isRequired,
        left: PropTypes.number.isRequired,
        top: PropTypes.number.isRequired,
        selected:PropTypes.bool.isRequired,
        handleClick:PropTypes.any.isRequired
        //hideSourceOnDrag: PropTypes.bool.isRequired
    },

    statics: {
        configureDragDrop:function(register,context) {
github rsamec / react-designer / src / app / components / ResizableHandle.js View on Github external
'use strict';

var React = require('react'),
    ItemTypes = require('./ItemTypes'),
    PropTypes = React.PropTypes,
    DragDropMixin =require('react-dnd').DragDropMixin,
    DropEffects = require('react-dnd').DropEffects

var ResizableHandle = React.createClass({
    mixins: [DragDropMixin],

    propTypes: {
        //id: PropTypes.any.isRequired,
        left: PropTypes.number.isRequired,
        top: PropTypes.number.isRequired
        //hideSourceOnDrag: PropTypes.bool.isRequired
    },

    statics: {
        configureDragDrop:function(register) {
            register(ItemTypes.RESIZABLE_HANDLE, {
                dragSource: {
                    beginDrag:function(component) {