Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'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) {
'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) {