From 96e561a4cb2c077bc586c909e7928af21269d138 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Wed, 10 Feb 2016 11:27:51 -0600 Subject: [PATCH] release v1.3.1 --- CHANGELOG.md | 6 + bower.json | 2 +- dist/react-draggable.js | 1093 ++++++++++++++----------------- dist/react-draggable.js.map | 2 +- dist/react-draggable.min.js | 2 +- dist/react-draggable.min.js.map | 2 +- package.json | 4 +- 7 files changed, 511 insertions(+), 600 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 014e864a..8a7307f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.3.1 (Feb 10, 2015) + +- Internal: Babel 6 and Flow definitions +- Bugfix: 1.3.0 broke string bounds ('parent', selectors, etc.). +- Bugfix: 1.3.0 wasn't updating deltaX and deltaY on a bounds hit. + ### 1.3.0 (Feb 10, 2015) - Possibly breaking change: bounds are calculated before `` fires `drag` events, as they should have been. diff --git a/bower.json b/bower.json index bf91f888..e5966e5e 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "1.3.0", + "version": "1.3.1", "homepage": "https://github.com/mzabriskie/react-draggable", "authors": [ "Matt Zabriskie" diff --git a/dist/react-draggable.js b/dist/react-draggable.js index 2c88254b..a41aab20 100644 --- a/dist/react-draggable.js +++ b/dist/react-draggable.js @@ -56,8 +56,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - module.exports = __webpack_require__(1); - module.exports.DraggableCore = __webpack_require__(10); + module.exports = __webpack_require__(1).default; + module.exports.DraggableCore = __webpack_require__(9).default; /***/ }, /* 1 */ @@ -65,23 +65,15 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); - - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); - - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = __webpack_require__(2); @@ -95,68 +87,77 @@ return /******/ (function(modules) { // webpackBootstrap var _classnames2 = _interopRequireDefault(_classnames); - var _objectAssign = __webpack_require__(5); + var _domFns = __webpack_require__(5); - var _objectAssign2 = _interopRequireDefault(_objectAssign); + var _positionFns = __webpack_require__(8); - var _utilsDomFns = __webpack_require__(6); + var _shims = __webpack_require__(6); - var _utilsPositionFns = __webpack_require__(9); + var _DraggableCore = __webpack_require__(9); - var _utilsShims = __webpack_require__(7); + var _DraggableCore2 = _interopRequireDefault(_DraggableCore); - var _DraggableCore2 = __webpack_require__(10); + var _log = __webpack_require__(10); - var _DraggableCore3 = _interopRequireDefault(_DraggableCore2); + var _log2 = _interopRequireDefault(_log); - var _utilsLog = __webpack_require__(11); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + // $FlowIgnore - var _utilsLog2 = _interopRequireDefault(_utilsLog); // // Define // - var Draggable = (function (_DraggableCore) { - _inherits(Draggable, _DraggableCore); + var Draggable = function (_React$Component) { + _inherits(Draggable, _React$Component); function Draggable() { - var _this = this; + var _Object$getPrototypeO; + + var _temp, _this, _ret; _classCallCheck(this, Draggable); - _get(Object.getPrototypeOf(Draggable.prototype), 'constructor', this).apply(this, arguments); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Draggable)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { // Whether or not we are currently dragging. dragging: false, + // Whether or not we have been dragged before. + dragged: false, + // Current transform x and y. - clientX: this.props.start.x, clientY: this.props.start.y, + clientX: _this.props.start.x, clientY: _this.props.start.y, // Used for compensating for out-of-bounds drags slackX: 0, slackY: 0, // Can only determine if SVG after mounting isElementSVG: false - }; - - this.onDragStart = function (e, coreEvent) { - (0, _utilsLog2['default'])('Draggable: onDragStart: %j', coreEvent.position); + }, _this.onDragStart = function (e, coreEvent) { + (0, _log2.default)('Draggable: onDragStart: %j', coreEvent.position); // Short-circuit if user's callback killed it. - var shouldStart = _this.props.onStart(e, (0, _utilsDomFns.createUIEvent)(_this, coreEvent)); + var shouldStart = _this.props.onStart(e, (0, _domFns.createUIEvent)(_this, coreEvent)); // Kills start event on core as well, so move handlers are never bound. if (shouldStart === false) return false; - _this.setState({ dragging: true }); - }; - - this.onDrag = function (e, coreEvent) { + _this.setState({ dragging: true, dragged: true }); + }, _this.onDrag = function (e, coreEvent) { if (!_this.state.dragging) return false; - (0, _utilsLog2['default'])('Draggable: onDrag: %j', coreEvent.position); + (0, _log2.default)('Draggable: onDrag: %j', coreEvent.position); - var uiEvent = (0, _utilsDomFns.createUIEvent)(_this, coreEvent); + var uiEvent = (0, _domFns.createUIEvent)(_this, coreEvent); var newState = { clientX: uiEvent.position.left, @@ -166,31 +167,35 @@ return /******/ (function(modules) { // webpackBootstrap // Keep within bounds. if (_this.props.bounds) { // Save original x and y. - var clientX = newState.clientX; - var clientY = newState.clientY; + var _clientX = newState.clientX; + var _clientY = newState.clientY; // Add slack to the values used to calculate bound position. This will ensure that if // we start removing slack, the element won't react to it right away until it's been // completely removed. + newState.clientX += _this.state.slackX; newState.clientY += _this.state.slackY; // Get bound position. This will ceil/floor the x and y within the boundaries. + // Recalculate slack by noting how much was shaved by the boundPosition handler. - var _getBoundPosition = (0, _utilsPositionFns.getBoundPosition)(_this, newState.clientX, newState.clientY); + var _getBoundPosition = (0, _positionFns.getBoundPosition)(_this, newState.clientX, newState.clientY); var _getBoundPosition2 = _slicedToArray(_getBoundPosition, 2); newState.clientX = _getBoundPosition2[0]; newState.clientY = _getBoundPosition2[1]; - newState.slackX = _this.state.slackX + (clientX - newState.clientX); - newState.slackY = _this.state.slackY + (clientY - newState.clientY); - - // Update the event we fire. - uiEvent.position.left = clientX; - uiEvent.position.top = clientY; + newState.slackX = _this.state.slackX + (_clientX - newState.clientX); + newState.slackY = _this.state.slackY + (_clientY - newState.clientY); + + // Update the event we fire to reflect what really happened after bounds took effect. + uiEvent.position.left = _clientX; + uiEvent.position.top = _clientY; + uiEvent.deltaX = newState.clientX - _this.state.clientX; + uiEvent.deltaY = newState.clientY - _this.state.clientY; } // Short-circuit if user's callback killed it. @@ -198,30 +203,28 @@ return /******/ (function(modules) { // webpackBootstrap if (shouldUpdate === false) return false; _this.setState(newState); - }; - - this.onDragStop = function (e, coreEvent) { + }, _this.onDragStop = function (e, coreEvent) { if (!_this.state.dragging) return false; // Short-circuit if user's callback killed it. - var shouldStop = _this.props.onStop(e, (0, _utilsDomFns.createUIEvent)(_this, coreEvent)); + var shouldStop = _this.props.onStop(e, (0, _domFns.createUIEvent)(_this, coreEvent)); if (shouldStop === false) return false; - (0, _utilsLog2['default'])('Draggable: onDragStop: %j', coreEvent.position); + (0, _log2.default)('Draggable: onDragStop: %j', coreEvent.position); _this.setState({ dragging: false, slackX: 0, slackY: 0 }); - }; + }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Draggable, [{ key: 'componentDidMount', value: function componentDidMount() { // Check to see if the element passed is an instanceof SVGElement - if (_reactDom2['default'].findDOMNode(this) instanceof SVGElement) { + if (_reactDom2.default.findDOMNode(this) instanceof SVGElement) { this.setState({ isElementSVG: true }); } } @@ -233,24 +236,26 @@ return /******/ (function(modules) { // webpackBootstrap }, { key: 'render', value: function render() { - var style = undefined, + var style = {}, svgTransform = null; + // Add a CSS transform to move the element around. This allows us to move the element around // without worrying about whether or not it is relatively or absolutely positioned. // If the item you are dragging already has a transform set, wrap it in a so // has a clean slate. - style = (0, _utilsDomFns.createTransform)({ + var transformOpts = { // Set left if horizontal drag is enabled - x: (0, _utilsPositionFns.canDragX)(this) ? this.state.clientX : this.props.start.x, + x: (0, _positionFns.canDragX)(this) ? this.state.clientX : this.props.start.x, // Set top if vertical drag is enabled - y: (0, _utilsPositionFns.canDragY)(this) ? this.state.clientY : this.props.start.y - }, this.state.isElementSVG); + y: (0, _positionFns.canDragY)(this) ? this.state.clientY : this.props.start.y + }; // If this element was SVG, we use the `transform` attribute. if (this.state.isElementSVG) { - svgTransform = style; - style = {}; + svgTransform = (0, _domFns.createSVGTransform)(transformOpts); + } else { + style = (0, _domFns.createCSSTransform)(transformOpts); } // zIndex option @@ -259,143 +264,134 @@ return /******/ (function(modules) { // webpackBootstrap } // Mark with class while dragging - var className = (0, _classnames2['default'])(this.props.children.props.className || '', 'react-draggable', { + var className = (0, _classnames2.default)(this.props.children.props.className || '', 'react-draggable', { 'react-draggable-dragging': this.state.dragging, 'react-draggable-dragged': this.state.dragged }); // Reuse the child provided // This makes it flexible to use whatever element is wanted (div, ul, etc) - return _react2['default'].createElement( - _DraggableCore3['default'], + return _react2.default.createElement( + _DraggableCore2.default, _extends({}, this.props, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), - _react2['default'].cloneElement(_react2['default'].Children.only(this.props.children), { + _react2.default.cloneElement(_react2.default.Children.only(this.props.children), { className: className, - style: (0, _objectAssign2['default'])({}, this.props.children.props.style, style), + style: _extends({}, this.props.children.props.style, style), transform: svgTransform }) ); } - }], [{ - key: 'displayName', - value: 'Draggable', - enumerable: true - }, { - key: 'propTypes', - value: (0, _objectAssign2['default'])({}, _DraggableCore3['default'].propTypes, { - /** - * `axis` determines which axis the draggable can move. - * - * Note that all callbacks will still return data as normal. This only - * controls flushing to the DOM. - * - * 'both' allows movement horizontally and vertically. - * 'x' limits movement to horizontal axis. - * 'y' limits movement to vertical axis. - * 'none' limits all movement. - * - * Defaults to 'both'. - */ - axis: _react.PropTypes.oneOf(['both', 'x', 'y', 'none']), - - /** - * `bounds` determines the range of movement available to the element. - * Available values are: - * - * 'parent' restricts movement within the Draggable's parent node. - * - * Alternatively, pass an object with the following properties, all of which are optional: - * - * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND} - * - * All values are in px. - * - * Example: - * - * ```jsx - * let App = React.createClass({ - * render: function () { - * return ( - * - *
Content
- *
- * ); - * } - * }); - * ``` - */ - bounds: _react.PropTypes.oneOfType([_react.PropTypes.shape({ - left: _react.PropTypes.Number, - right: _react.PropTypes.Number, - top: _react.PropTypes.Number, - bottom: _react.PropTypes.Number - }), _react.PropTypes.string, _react.PropTypes.oneOf([false])]), - - /** - * `start` specifies the x and y that the dragged item should start at - * - * Example: - * - * ```jsx - * let App = React.createClass({ - * render: function () { - * return ( - * - *
I start with transformX: 25px and transformY: 25px;
- *
- * ); - * } - * }); - * ``` - */ - start: _react.PropTypes.shape({ - x: _react.PropTypes.number, - y: _react.PropTypes.number - }), - - /** - * `zIndex` specifies the zIndex to use while dragging. - * - * Example: - * - * ```jsx - * let App = React.createClass({ - * render: function () { - * return ( - * - *
I have a zIndex
- *
- * ); - * } - * }); - * ``` - */ - zIndex: _react.PropTypes.number, - - /** - * These properties should be defined on the child, not here. - */ - className: _utilsShims.dontSetMe, - style: _utilsShims.dontSetMe, - transform: _utilsShims.dontSetMe - }), - enumerable: true - }, { - key: 'defaultProps', - value: (0, _objectAssign2['default'])({}, _DraggableCore3['default'].defaultProps, { - axis: 'both', - bounds: false, - start: { x: 0, y: 0 }, - zIndex: NaN - }), - enumerable: true }]); return Draggable; - })(_DraggableCore3['default']); - - exports['default'] = Draggable; - module.exports = exports['default']; + }(_react2.default.Component); + + Draggable.displayName = 'Draggable'; + Draggable.propTypes = _extends({}, _DraggableCore2.default.propTypes, { + + /** + * `axis` determines which axis the draggable can move. + * + * Note that all callbacks will still return data as normal. This only + * controls flushing to the DOM. + * + * 'both' allows movement horizontally and vertically. + * 'x' limits movement to horizontal axis. + * 'y' limits movement to vertical axis. + * 'none' limits all movement. + * + * Defaults to 'both'. + */ + axis: _react.PropTypes.oneOf(['both', 'x', 'y', 'none']), + + /** + * `bounds` determines the range of movement available to the element. + * Available values are: + * + * 'parent' restricts movement within the Draggable's parent node. + * + * Alternatively, pass an object with the following properties, all of which are optional: + * + * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND} + * + * All values are in px. + * + * Example: + * + * ```jsx + * let App = React.createClass({ + * render: function () { + * return ( + * + *
Content
+ *
+ * ); + * } + * }); + * ``` + */ + bounds: _react.PropTypes.oneOfType([_react.PropTypes.shape({ + left: _react.PropTypes.Number, + right: _react.PropTypes.Number, + top: _react.PropTypes.Number, + bottom: _react.PropTypes.Number + }), _react.PropTypes.string, _react.PropTypes.oneOf([false])]), + + /** + * `start` specifies the x and y that the dragged item should start at + * + * Example: + * + * ```jsx + * let App = React.createClass({ + * render: function () { + * return ( + * + *
I start with transformX: 25px and transformY: 25px;
+ *
+ * ); + * } + * }); + * ``` + */ + start: _react.PropTypes.shape({ + x: _react.PropTypes.number, + y: _react.PropTypes.number + }), + + /** + * `zIndex` specifies the zIndex to use while dragging. + * + * Example: + * + * ```jsx + * let App = React.createClass({ + * render: function () { + * return ( + * + *
I have a zIndex
+ *
+ * ); + * } + * }); + * ``` + */ + zIndex: _react.PropTypes.number, + + /** + * These properties should be defined on the child, not here. + */ + className: _shims.dontSetMe, + style: _shims.dontSetMe, + transform: _shims.dontSetMe + }); + Draggable.defaultProps = _extends({}, _DraggableCore2.default.defaultProps, { + axis: 'both', + bounds: false, + start: { x: 0, y: 0 }, + zIndex: NaN + }); + exports.default = Draggable; /***/ }, /* 2 */ @@ -465,58 +461,16 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }, /* 5 */ -/***/ function(module, exports) { - - /* eslint-disable no-unused-vars */ - 'use strict'; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var propIsEnumerable = Object.prototype.propertyIsEnumerable; - - function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } - - return Object(val); - } - - module.exports = Object.assign || function (target, source) { - var from; - var to = toObject(target); - var symbols; - - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } - - if (Object.getOwnPropertySymbols) { - symbols = Object.getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - - return to; - }; - - -/***/ }, -/* 6 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); + + var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; + exports.matchesSelector = matchesSelector; exports.addEvent = addEvent; exports.removeEvent = removeEvent; @@ -524,7 +478,6 @@ return /******/ (function(modules) { // webpackBootstrap exports.outerWidth = outerWidth; exports.innerHeight = innerHeight; exports.innerWidth = innerWidth; - exports.createTransform = createTransform; exports.createCSSTransform = createCSSTransform; exports.createSVGTransform = createSVGTransform; exports.addUserSelectStyles = addUserSelectStyles; @@ -533,42 +486,32 @@ return /******/ (function(modules) { // webpackBootstrap exports.createCoreEvent = createCoreEvent; exports.createUIEvent = createUIEvent; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - - var _shims = __webpack_require__(7); + var _shims = __webpack_require__(6); - var _getPrefix = __webpack_require__(8); + var _getPrefix = __webpack_require__(7); var _getPrefix2 = _interopRequireDefault(_getPrefix); - var _objectAssign = __webpack_require__(5); - - var _objectAssign2 = _interopRequireDefault(_objectAssign); - var _reactDom = __webpack_require__(3); var _reactDom2 = _interopRequireDefault(_reactDom); - var matchesSelectorFunc = ''; + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + var matchesSelectorFunc = ''; function matchesSelector(el, selector) { - if (!(el instanceof Node)) throw new TypeError('Value of argument \'el\' violates contract, expected Node got ' + (el === null ? 'null' : el instanceof Object && el.constructor ? el.constructor.name : typeof el)); - if (typeof selector !== 'string') throw new TypeError('Value of argument \'selector\' violates contract, expected string got ' + (selector === null ? 'null' : selector instanceof Object && selector.constructor ? selector.constructor.name : typeof selector)); - if (!matchesSelectorFunc) { matchesSelectorFunc = (0, _shims.findInArray)(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) { + // $FlowIgnore: Doesn't think elements are indexable return (0, _shims.isFunction)(el[method]); }); } + // $FlowIgnore: Doesn't think elements are indexable return el[matchesSelectorFunc].call(el, selector); } function addEvent(el, event, handler) { - if (el != null && !(el instanceof Node)) throw new TypeError('Value of argument \'el\' violates contract, expected null or Node got ' + (el === null ? 'null' : el instanceof Object && el.constructor ? el.constructor.name : typeof el)); - if (typeof event !== 'string') throw new TypeError('Value of argument \'event\' violates contract, expected string got ' + (event === null ? 'null' : event instanceof Object && event.constructor ? event.constructor.name : typeof event)); - if (typeof handler !== 'function') throw new TypeError('Value of argument \'handler\' violates contract, expected function got ' + (handler === null ? 'null' : handler instanceof Object && handler.constructor ? handler.constructor.name : typeof handler)); - if (!el) { return; } @@ -577,15 +520,12 @@ return /******/ (function(modules) { // webpackBootstrap } else if (el.addEventListener) { el.addEventListener(event, handler, true); } else { + // $FlowIgnore: Doesn't think elements are indexable el['on' + event] = handler; } } function removeEvent(el, event, handler) { - if (el != null && !(el instanceof Node)) throw new TypeError('Value of argument \'el\' violates contract, expected null or Node got ' + (el === null ? 'null' : el instanceof Object && el.constructor ? el.constructor.name : typeof el)); - if (typeof event !== 'string') throw new TypeError('Value of argument \'event\' violates contract, expected string got ' + (event === null ? 'null' : event instanceof Object && event.constructor ? event.constructor.name : typeof event)); - if (typeof handler !== 'function') throw new TypeError('Value of argument \'handler\' violates contract, expected function got ' + (handler === null ? 'null' : handler instanceof Object && handler.constructor ? handler.constructor.name : typeof handler)); - if (!el) { return; } @@ -594,13 +534,12 @@ return /******/ (function(modules) { // webpackBootstrap } else if (el.removeEventListener) { el.removeEventListener(event, handler, true); } else { + // $FlowIgnore: Doesn't think elements are indexable el['on' + event] = null; } } function outerHeight(node) { - if (!(node instanceof Node)) throw new TypeError('Value of argument \'node\' violates contract, expected Node got ' + (node === null ? 'null' : node instanceof Object && node.constructor ? node.constructor.name : typeof node)); - // This is deliberately excluding margin for our calculations, since we are using // offsetTop which is including margin. See getBoundPosition var height = node.clientHeight; @@ -611,8 +550,6 @@ return /******/ (function(modules) { // webpackBootstrap } function outerWidth(node) { - if (!(node instanceof Node)) throw new TypeError('Value of argument \'node\' violates contract, expected Node got ' + (node === null ? 'null' : node instanceof Object && node.constructor ? node.constructor.name : typeof node)); - // This is deliberately excluding margin for our calculations, since we are using // offsetLeft which is including margin. See getBoundPosition var width = node.clientWidth; @@ -621,10 +558,7 @@ return /******/ (function(modules) { // webpackBootstrap width += (0, _shims.int)(computedStyle.borderRightWidth); return width; } - function innerHeight(node) { - if (!(node instanceof Node)) throw new TypeError('Value of argument \'node\' violates contract, expected Node got ' + (node === null ? 'null' : node instanceof Object && node.constructor ? node.constructor.name : typeof node)); - var height = node.clientHeight; var computedStyle = window.getComputedStyle(node); height -= (0, _shims.int)(computedStyle.paddingTop); @@ -633,8 +567,6 @@ return /******/ (function(modules) { // webpackBootstrap } function innerWidth(node) { - if (!(node instanceof Node)) throw new TypeError('Value of argument \'node\' violates contract, expected Node got ' + (node === null ? 'null' : node instanceof Object && node.constructor ? node.constructor.name : typeof node)); - var width = node.clientWidth; var computedStyle = window.getComputedStyle(node); width -= (0, _shims.int)(computedStyle.paddingLeft); @@ -642,46 +574,32 @@ return /******/ (function(modules) { // webpackBootstrap return width; } - function createTransform(position, isSVG) { - if (typeof position !== 'object') throw new TypeError('Value of argument \'position\' violates contract, expected object got ' + (position === null ? 'null' : position instanceof Object && position.constructor ? position.constructor.name : typeof position)); - if (isSVG != null && typeof isSVG !== 'boolean') throw new TypeError('Value of argument \'isSVG\' violates contract, expected null or boolean got ' + (isSVG === null ? 'null' : isSVG instanceof Object && isSVG.constructor ? isSVG.constructor.name : typeof isSVG)); - - if (isSVG) return createSVGTransform(position); - return createCSSTransform(position); - } - function createCSSTransform(_ref) { var x = _ref.x; var y = _ref.y; - return (function () { - if ({ x: x, y: y } === null || typeof { x: x, y: y } !== 'object' || typeof { x: x, y: y }.x !== 'number' || typeof { x: x, y: y }.y !== 'number') throw new TypeError('Value of argument \'undefined\' violates contract, expected Object with properties x and y got ' + ({ x: x, y: y } === null ? 'null' : { x: x, y: y } instanceof Object && { x: x, y: y }.constructor ? { x: x, y: y }.constructor.name : typeof { x: x, y: y })); - - // Replace unitless items with px - var out = { transform: 'translate(' + x + 'px,' + y + 'px)' }; - // Add single prefixed property as well - if (_getPrefix2['default']) { - out[_getPrefix2['default'] + 'Transform'] = out.transform; - } - return out; - })(); + + // Replace unitless items with px + var out = { transform: 'translate(' + x + 'px,' + y + 'px)' }; + // Add single prefixed property as well + if (_getPrefix2.default) { + out[_getPrefix2.default + 'Transform'] = out.transform; + } + return out; } function createSVGTransform(_ref2) { var x = _ref2.x; var y = _ref2.y; - return (function () { - if ({ x: x, y: y } === null || typeof { x: x, y: y } !== 'object' || typeof { x: x, y: y }.x !== 'number' || typeof { x: x, y: y }.y !== 'number') throw new TypeError('Value of argument \'undefined\' violates contract, expected Object with properties x and y got ' + ({ x: x, y: y } === null ? 'null' : { x: x, y: y } instanceof Object && { x: x, y: y }.constructor ? { x: x, y: y }.constructor.name : typeof { x: x, y: y })); - return 'translate(' + x + ',' + y + ')'; - })(); + return 'translate(' + x + ',' + y + ')'; } // User-select Hacks: // // Useful for preventing blue highlights all over everything when dragging. var userSelectStyle = ';user-select: none;'; - if (_getPrefix2['default']) { - userSelectStyle += '-' + _getPrefix2['default'].toLowerCase() + '-user-select: none;'; + if (_getPrefix2.default) { + userSelectStyle += '-' + _getPrefix2.default.toLowerCase() + '-user-select: none;'; } function addUserSelectStyles() { @@ -699,22 +617,19 @@ return /******/ (function(modules) { // webpackBootstrap // Workaround IE pointer events; see #51 // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278 - var touchHacks = { + return _extends({ touchAction: 'none' - }; - - return (0, _objectAssign2['default'])(touchHacks, childStyle); + }, childStyle); } // Create an event exposed by - function createCoreEvent(draggable, clientX, clientY) { // State changes are often (but not always!) async. We want the latest value. var state = draggable._pendingState || draggable.state; var isStart = !(0, _shims.isNum)(state.lastX); return { - node: _reactDom2['default'].findDOMNode(draggable), + node: _reactDom2.default.findDOMNode(draggable), position: isStart ? // If this is our first move, use the clientX and clientY as last coords. { @@ -732,10 +647,9 @@ return /******/ (function(modules) { // webpackBootstrap } // Create an event exposed by - function createUIEvent(draggable, coreEvent) { return { - node: _reactDom2['default'].findDOMNode(draggable), + node: _reactDom2.default.findDOMNode(draggable), position: { left: draggable.state.clientX + coreEvent.position.deltaX, top: draggable.state.clientY + coreEvent.position.deltaY @@ -746,13 +660,12 @@ return /******/ (function(modules) { // webpackBootstrap } /***/ }, -/* 7 */ +/* 6 */ /***/ function(module, exports) { - // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); exports.findInArray = findInArray; @@ -761,8 +674,9 @@ return /******/ (function(modules) { // webpackBootstrap exports.int = int; exports.dontSetMe = dontSetMe; + // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc function findInArray(array, callback) { - for (var i = 0, _length = array.length; i < _length; i++) { + for (var i = 0, length = array.length; i < length; i++) { if (callback.apply(callback, [array[i], i, array])) return array[i]; } } @@ -786,16 +700,16 @@ return /******/ (function(modules) { // webpackBootstrap } /***/ }, -/* 8 */ +/* 7 */ /***/ function(module, exports) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - - exports['default'] = (function () { + exports.generatePrefix = generatePrefix; + function generatePrefix() { // Checking specifically for 'window.document' is for pseudo-browser server-side // environments that define 'window' as the global context. // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84) @@ -803,23 +717,23 @@ return /******/ (function(modules) { // webpackBootstrap // Thanks David Walsh var styles = window.getComputedStyle(document.documentElement, ''), - pre = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || styles.OLink === '' && ['', 'o'])[1]; + pre = (Array.prototype.slice.call(styles).join('').match(/-(moz|webkit|ms)-/) || (styles.OLink === '' ? ['', 'o'] : []))[1]; // 'ms' is not titlecased if (pre === undefined || pre === null) return ''; if (pre === 'ms') return pre; if (pre === undefined || pre === null) return ''; return pre.slice(0, 1).toUpperCase() + pre.slice(1); - })(); + } - module.exports = exports['default']; + exports.default = generatePrefix(); /***/ }, -/* 9 */ +/* 8 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); exports.getBoundPosition = getBoundPosition; @@ -828,23 +742,29 @@ return /******/ (function(modules) { // webpackBootstrap exports.canDragY = canDragY; exports.getControlPosition = getControlPosition; - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _react = __webpack_require__(2); + + var _react2 = _interopRequireDefault(_react); - var _shims = __webpack_require__(7); + var _shims = __webpack_require__(6); var _reactDom = __webpack_require__(3); var _reactDom2 = _interopRequireDefault(_reactDom); - var _domFns = __webpack_require__(6); + var _domFns = __webpack_require__(5); + + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function getBoundPosition(draggable, clientX, clientY) { // If no bounds, short-circuit and move on if (!draggable.props.bounds) return [clientX, clientY]; // Clone new bounds - var bounds = cloneBounds(draggable.props.bounds); - var node = _reactDom2['default'].findDOMNode(draggable); + var bounds = draggable.props.bounds; + + bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds); + var node = _reactDom2.default.findDOMNode(draggable); if (typeof bounds === 'string') { var boundNode = undefined; @@ -891,7 +811,6 @@ return /******/ (function(modules) { // webpackBootstrap } // Get {clientX, clientY} positions from event. - function getControlPosition(e) { var position = e.targetTouches && e.targetTouches[0] || e; return { @@ -911,40 +830,40 @@ return /******/ (function(modules) { // webpackBootstrap } /***/ }, -/* 10 */ +/* 9 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - Object.defineProperty(exports, '__esModule', { + Object.defineProperty(exports, "__esModule", { value: true }); - var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })(); + var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); + var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; + var _react = __webpack_require__(2); - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + var _react2 = _interopRequireDefault(_react); - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } + var _domFns = __webpack_require__(5); - function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + var _positionFns = __webpack_require__(8); - var _react = __webpack_require__(2); + var _shims = __webpack_require__(6); - var _react2 = _interopRequireDefault(_react); + var _log = __webpack_require__(10); - var _utilsDomFns = __webpack_require__(6); + var _log2 = _interopRequireDefault(_log); - var _utilsPositionFns = __webpack_require__(9); + function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - var _utilsShims = __webpack_require__(7); + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - var _utilsLog = __webpack_require__(11); + function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - var _utilsLog2 = _interopRequireDefault(_utilsLog); + function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } // Simple abstraction for dragging events names. var eventsFor = { @@ -970,23 +889,25 @@ return /******/ (function(modules) { // webpackBootstrap // work well with libraries that require more control over the element. // - var DraggableCore = (function (_React$Component) { + var DraggableCore = function (_React$Component) { _inherits(DraggableCore, _React$Component); function DraggableCore() { - var _this = this; + var _Object$getPrototypeO; + + var _temp, _this, _ret; _classCallCheck(this, DraggableCore); - _get(Object.getPrototypeOf(DraggableCore.prototype), 'constructor', this).apply(this, arguments); + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(DraggableCore)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { dragging: false, // Used while dragging to determine deltas. lastX: null, lastY: null - }; - - this.handleDragStart = function (e) { + }, _this.handleDragStart = function (e) { // Make it possible to attach event handlers on top of this one. _this.props.onMouseDown(e); @@ -994,7 +915,7 @@ return /******/ (function(modules) { // webpackBootstrap if (!_this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false; // Short circuit if handle or cancel prop was provided and selector doesn't match. - if (_this.props.disabled || _this.props.handle && !(0, _utilsDomFns.matchesSelector)(e.target, _this.props.handle) || _this.props.cancel && (0, _utilsDomFns.matchesSelector)(e.target, _this.props.cancel)) { + if (_this.props.disabled || _this.props.handle && !(0, _domFns.matchesSelector)(e.target, _this.props.handle) || _this.props.cancel && (0, _domFns.matchesSelector)(e.target, _this.props.cancel)) { return; } @@ -1007,22 +928,23 @@ return /******/ (function(modules) { // webpackBootstrap // Add a style to the body to disable user-select. This prevents text from // being selected all over the page. - if (_this.props.enableUserSelectHack) (0, _utilsDomFns.addUserSelectStyles)(); + if (_this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(); // Get the current drag point from the event. This is used as the offset. - var _getControlPosition = (0, _utilsPositionFns.getControlPosition)(e); + var _getControlPosition = (0, _positionFns.getControlPosition)(e); var clientX = _getControlPosition.clientX; var clientY = _getControlPosition.clientY; // Create an event object with all the data parents need to make a decision here. - var coreEvent = (0, _utilsDomFns.createCoreEvent)(_this, clientX, clientY); - (0, _utilsLog2['default'])('DraggableCore: handleDragStart: %j', coreEvent.position); + var coreEvent = (0, _domFns.createCoreEvent)(_this, clientX, clientY); + + (0, _log2.default)('DraggableCore: handleDragStart: %j', coreEvent.position); // Call event handler. If it returns explicit false, cancel. - (0, _utilsLog2['default'])('calling', _this.props.onStart); + (0, _log2.default)('calling', _this.props.onStart); var shouldUpdate = _this.props.onStart(e, coreEvent); if (shouldUpdate === false) return; @@ -1040,29 +962,28 @@ return /******/ (function(modules) { // webpackBootstrap }); // Translate el on page scroll. - (0, _utilsDomFns.addEvent)(document, 'scroll', _this.handleScroll); + (0, _domFns.addEvent)(document, 'scroll', _this.handleScroll); // Add events to the document directly so we catch when the user's mouse/touch moves outside of // this element. We use different events depending on whether or not we have detected that this // is a touch-capable device. - (0, _utilsDomFns.addEvent)(document, dragEventFor.move, _this.handleDrag); - (0, _utilsDomFns.addEvent)(document, dragEventFor.stop, _this.handleDragStop); - }; - - this.handleDrag = function (e) { + (0, _domFns.addEvent)(document, dragEventFor.move, _this.handleDrag); + (0, _domFns.addEvent)(document, dragEventFor.stop, _this.handleDragStop); + }, _this.handleDrag = function (e) { // Return if this is a touch event, but not the correct one for this element if (e.targetTouches && e.targetTouches[0].identifier !== _this.state.touchIdentifier) return; - var _getControlPosition2 = (0, _utilsPositionFns.getControlPosition)(e); + var _getControlPosition2 = (0, _positionFns.getControlPosition)(e); var clientX = _getControlPosition2.clientX; var clientY = _getControlPosition2.clientY; // Snap to grid if prop has been provided + if (Array.isArray(_this.props.grid)) { var deltaX = clientX - _this.state.lastX, deltaY = clientY - _this.state.lastY; - var _snapToGrid = (0, _utilsPositionFns.snapToGrid)(_this.props.grid, deltaX, deltaY); + var _snapToGrid = (0, _positionFns.snapToGrid)(_this.props.grid, deltaX, deltaY); var _snapToGrid2 = _slicedToArray(_snapToGrid, 2); @@ -1073,9 +994,9 @@ return /******/ (function(modules) { // webpackBootstrap clientX = _this.state.lastX + deltaX, clientY = _this.state.lastY + deltaY; } - var coreEvent = (0, _utilsDomFns.createCoreEvent)(_this, clientX, clientY); + var coreEvent = (0, _domFns.createCoreEvent)(_this, clientX, clientY); - (0, _utilsLog2['default'])('DraggableCore: handleDrag: %j', coreEvent.position); + (0, _log2.default)('DraggableCore: handleDrag: %j', coreEvent.position); // Call event handler. If it returns explicit false, trigger end. var shouldUpdate = _this.props.onDrag(e, coreEvent); @@ -1088,9 +1009,7 @@ return /******/ (function(modules) { // webpackBootstrap lastX: clientX, lastY: clientY }); - }; - - this.handleDragStop = function (e) { + }, _this.handleDragStop = function (e) { if (!_this.state.dragging) return; // Short circuit if this is not the correct touch event. `changedTouches` contains all @@ -1098,16 +1017,16 @@ return /******/ (function(modules) { // webpackBootstrap if (e.changedTouches && e.changedTouches[0].identifier !== _this.state.touchIdentifier) return; // Remove user-select hack - if (_this.props.enableUserSelectHack) (0, _utilsDomFns.removeUserSelectStyles)(); + if (_this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(); - var _getControlPosition3 = (0, _utilsPositionFns.getControlPosition)(e); + var _getControlPosition3 = (0, _positionFns.getControlPosition)(e); var clientX = _getControlPosition3.clientX; var clientY = _getControlPosition3.clientY; - var coreEvent = (0, _utilsDomFns.createCoreEvent)(_this, clientX, clientY); + var coreEvent = (0, _domFns.createCoreEvent)(_this, clientX, clientY); - (0, _utilsLog2['default'])('DraggableCore: handleDragStop: %j', coreEvent.position); + (0, _log2.default)('DraggableCore: handleDragStop: %j', coreEvent.position); // Reset the el. _this.setState({ @@ -1120,19 +1039,17 @@ return /******/ (function(modules) { // webpackBootstrap _this.props.onStop(e, coreEvent); // Remove event handlers - (0, _utilsLog2['default'])('DraggableCore: Removing handlers'); - (0, _utilsDomFns.removeEvent)(document, 'scroll', _this.handleScroll); - (0, _utilsDomFns.removeEvent)(document, dragEventFor.move, _this.handleDrag); - (0, _utilsDomFns.removeEvent)(document, dragEventFor.stop, _this.handleDragStop); - }; - - this.handleScroll = function (e) { + (0, _log2.default)('DraggableCore: Removing handlers'); + (0, _domFns.removeEvent)(document, 'scroll', _this.handleScroll); + (0, _domFns.removeEvent)(document, dragEventFor.move, _this.handleDrag); + (0, _domFns.removeEvent)(document, dragEventFor.stop, _this.handleDragStop); + }, _this.handleScroll = function (e) { var s = _this.state, x = document.body.scrollLeft, y = document.body.scrollTop; // Create the usual event, but make the scroll offset our deltas. - var coreEvent = (0, _utilsDomFns.createCoreEvent)(_this); + var coreEvent = (0, _domFns.createCoreEvent)(_this); coreEvent.position.deltaX = x - s.scrollX; coreEvent.position.deltaY = y - s.scrollY; @@ -1142,9 +1059,7 @@ return /******/ (function(modules) { // webpackBootstrap }); _this.props.onDrag(e, coreEvent); - }; - - this.onMouseDown = function (e) { + }, _this.onMouseDown = function (e) { // HACK: Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled. // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable. // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/ @@ -1153,14 +1068,12 @@ return /******/ (function(modules) { // webpackBootstrap } return _this.handleDragStart(e); - }; - - this.onTouchStart = function (e) { + }, _this.onTouchStart = function (e) { // We're on a touch device now, so change the event handlers dragEventFor = eventsFor.touch; return _this.handleDragStart(e); - }; + }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(DraggableCore, [{ @@ -1168,20 +1081,30 @@ return /******/ (function(modules) { // webpackBootstrap value: function componentWillUnmount() { // Remove any leftover event handlers. Remove both touch and mouse handlers in case // some browser quirk caused a touch event to fire during a mouse move, or vice versa. - (0, _utilsDomFns.removeEvent)(document, eventsFor.mouse.move, this.handleDrag); - (0, _utilsDomFns.removeEvent)(document, eventsFor.touch.move, this.handleDrag); - (0, _utilsDomFns.removeEvent)(document, eventsFor.mouse.stop, this.handleDragStop); - (0, _utilsDomFns.removeEvent)(document, eventsFor.touch.stop, this.handleDragStop); - (0, _utilsDomFns.removeEvent)(document, 'scroll', this.handleScroll); - if (this.props.enableUserSelectHack) (0, _utilsDomFns.removeUserSelectStyles)(); + (0, _domFns.removeEvent)(document, eventsFor.mouse.move, this.handleDrag); + (0, _domFns.removeEvent)(document, eventsFor.touch.move, this.handleDrag); + (0, _domFns.removeEvent)(document, eventsFor.mouse.stop, this.handleDragStop); + (0, _domFns.removeEvent)(document, eventsFor.touch.stop, this.handleDragStop); + (0, _domFns.removeEvent)(document, 'scroll', this.handleScroll); + if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(); } + + // When the user scrolls, adjust internal state so the draggable moves along the page properly. + // This only fires when a drag is active. + + + // On mousedown, consider the drag started. + + + // Same as onMouseDown (start drag), but now consider this a touch device. + }, { key: 'render', value: function render() { // Reuse the child provided // This makes it flexible to use whatever element is wanted (div, ul, etc) - return _react2['default'].cloneElement(_react2['default'].Children.only(this.props.children), { - style: (0, _utilsDomFns.styleHacks)(this.props.children.props.style), + return _react2.default.cloneElement(_react2.default.Children.only(this.props.children), { + style: (0, _domFns.styleHacks)(this.props.children.props.style), // Note: mouseMove handler is attached to document so it will still function // when the user drags quickly and leaves the bounds of the element. @@ -1191,220 +1114,203 @@ return /******/ (function(modules) { // webpackBootstrap onTouchEnd: this.handleDragStop }); } - }], [{ - key: 'displayName', - value: 'DraggableCore', - enumerable: true - }, { - key: 'propTypes', - value: { - /** - * `allowAnyClick` allows dragging using any mouse button. - * By default, we only accept the left button. - * - * Defaults to `false`. - */ - allowAnyClick: _react.PropTypes.bool, - - /** - * `disabled`, if true, stops the from dragging. All handlers, - * with the exception of `onMouseDown`, will not fire. - * - * Example: - * - * ```jsx - * let App = React.createClass({ - * render: function () { - * return ( - * - *
I can't be dragged
- *
- * ); - * } - * }); - * ``` - */ - disabled: _react.PropTypes.bool, - - /** - * By default, we add 'user-select:none' attributes to the document body - * to prevent ugly text selection during drag. If this is causing problems - * for your app, set this to `false`. - */ - enableUserSelectHack: _react.PropTypes.bool, - - /** - * `grid` specifies the x and y that dragging should snap to. - * - * Example: - * - * ```jsx - * let App = React.createClass({ - * render: function () { - * return ( - * - *
I snap to a 25 x 25 grid
- *
- * ); - * } - * }); - * ``` - */ - grid: _react.PropTypes.arrayOf(_react.PropTypes.number), - - /** - * `handle` specifies a selector to be used as the handle that initiates drag. - * - * Example: - * - * ```jsx - * let App = React.createClass({ - * render: function () { - * return ( - * - *
- *
Click me to drag
- *
This is some other content
- *
- *
- * ); - * } - * }); - * ``` - */ - handle: _react.PropTypes.string, - - /** - * `cancel` specifies a selector to be used to prevent drag initialization. - * - * Example: - * - * ```jsx - * let App = React.createClass({ - * render: function () { - * return( - * - *
- *
You can't drag from here
- *
Dragging here works fine
- *
- *
- * ); - * } - * }); - * ``` - */ - cancel: _react.PropTypes.string, - - /** - * Called when dragging starts. - * If this function returns the boolean false, dragging will be canceled. - * - * Example: - * - * ```js - * function (event, ui) {} - * ``` - * - * `event` is the Event that was triggered. - * `ui` is an object: - * - * ```js - * { - * position: {top: 0, left: 0} - * } - * ``` - */ - onStart: _react.PropTypes.func, - - /** - * Called while dragging. - * If this function returns the boolean false, dragging will be canceled. - * - * Example: - * - * ```js - * function (event, ui) {} - * ``` - * - * `event` is the Event that was triggered. - * `ui` is an object: - * - * ```js - * { - * position: {top: 0, left: 0} - * } - * ``` - */ - onDrag: _react.PropTypes.func, - - /** - * Called when dragging stops. - * - * Example: - * - * ```js - * function (event, ui) {} - * ``` - * - * `event` is the Event that was triggered. - * `ui` is an object: - * - * ```js - * { - * position: {top: 0, left: 0} - * } - * ``` - */ - onStop: _react.PropTypes.func, - - /** - * A workaround option which can be passed if onMouseDown needs to be accessed, - * since it'll always be blocked (due to that there's internal use of onMouseDown) - */ - onMouseDown: _react.PropTypes.func, - - /** - * These properties should be defined on the child, not here. - */ - className: _utilsShims.dontSetMe, - style: _utilsShims.dontSetMe, - transform: _utilsShims.dontSetMe - }, - enumerable: true - }, { - key: 'defaultProps', - value: { - allowAnyClick: false, // by default only accept left click - cancel: null, - disabled: false, - enableUserSelectHack: true, - handle: null, - grid: null, - transform: null, - onStart: function onStart() {}, - onDrag: function onDrag() {}, - onStop: function onStop() {}, - onMouseDown: function onMouseDown() {} - }, - enumerable: true }]); return DraggableCore; - })(_react2['default'].Component); - - exports['default'] = DraggableCore; - module.exports = exports['default']; - - // When the user scrolls, adjust internal state so the draggable moves along the page properly. - // This only fires when a drag is active. - - // On mousedown, consider the drag started. - - // Same as onMouseDown (start drag), but now consider this a touch device. + }(_react2.default.Component); + + DraggableCore.displayName = 'DraggableCore'; + DraggableCore.propTypes = { + /** + * `allowAnyClick` allows dragging using any mouse button. + * By default, we only accept the left button. + * + * Defaults to `false`. + */ + allowAnyClick: _react.PropTypes.bool, + + /** + * `disabled`, if true, stops the from dragging. All handlers, + * with the exception of `onMouseDown`, will not fire. + * + * Example: + * + * ```jsx + * let App = React.createClass({ + * render: function () { + * return ( + * + *
I can't be dragged
+ *
+ * ); + * } + * }); + * ``` + */ + disabled: _react.PropTypes.bool, + + /** + * By default, we add 'user-select:none' attributes to the document body + * to prevent ugly text selection during drag. If this is causing problems + * for your app, set this to `false`. + */ + enableUserSelectHack: _react.PropTypes.bool, + + /** + * `grid` specifies the x and y that dragging should snap to. + * + * Example: + * + * ```jsx + * let App = React.createClass({ + * render: function () { + * return ( + * + *
I snap to a 25 x 25 grid
+ *
+ * ); + * } + * }); + * ``` + */ + grid: _react.PropTypes.arrayOf(_react.PropTypes.number), + + /** + * `handle` specifies a selector to be used as the handle that initiates drag. + * + * Example: + * + * ```jsx + * let App = React.createClass({ + * render: function () { + * return ( + * + *
+ *
Click me to drag
+ *
This is some other content
+ *
+ *
+ * ); + * } + * }); + * ``` + */ + handle: _react.PropTypes.string, + + /** + * `cancel` specifies a selector to be used to prevent drag initialization. + * + * Example: + * + * ```jsx + * let App = React.createClass({ + * render: function () { + * return( + * + *
+ *
You can't drag from here
+ *
Dragging here works fine
+ *
+ *
+ * ); + * } + * }); + * ``` + */ + cancel: _react.PropTypes.string, + + /** + * Called when dragging starts. + * If this function returns the boolean false, dragging will be canceled. + * + * Example: + * + * ```js + * function (event, ui) {} + * ``` + * + * `event` is the Event that was triggered. + * `ui` is an object: + * + * ```js + * { + * position: {top: 0, left: 0} + * } + * ``` + */ + onStart: _react.PropTypes.func, + + /** + * Called while dragging. + * If this function returns the boolean false, dragging will be canceled. + * + * Example: + * + * ```js + * function (event, ui) {} + * ``` + * + * `event` is the Event that was triggered. + * `ui` is an object: + * + * ```js + * { + * position: {top: 0, left: 0} + * } + * ``` + */ + onDrag: _react.PropTypes.func, + + /** + * Called when dragging stops. + * + * Example: + * + * ```js + * function (event, ui) {} + * ``` + * + * `event` is the Event that was triggered. + * `ui` is an object: + * + * ```js + * { + * position: {top: 0, left: 0} + * } + * ``` + */ + onStop: _react.PropTypes.func, + + /** + * A workaround option which can be passed if onMouseDown needs to be accessed, + * since it'll always be blocked (due to that there's internal use of onMouseDown) + */ + onMouseDown: _react.PropTypes.func, + + /** + * These properties should be defined on the child, not here. + */ + className: _shims.dontSetMe, + style: _shims.dontSetMe, + transform: _shims.dontSetMe + }; + DraggableCore.defaultProps = { + allowAnyClick: false, // by default only accept left click + cancel: null, + disabled: false, + enableUserSelectHack: true, + handle: null, + grid: null, + transform: null, + onStart: function onStart() {}, + onDrag: function onDrag() {}, + onStop: function onStop() {}, + onMouseDown: function onMouseDown() {} + }; + exports.default = DraggableCore; /***/ }, -/* 11 */ +/* 10 */ /***/ function(module, exports, __webpack_require__) { "use strict"; @@ -1412,13 +1318,12 @@ return /******/ (function(modules) { // webpackBootstrap Object.defineProperty(exports, "__esModule", { value: true }); - exports["default"] = log; - + exports.default = log; function log() { - if ((undefined)) console.log.apply(console, arguments); - } + var _console; - module.exports = exports["default"]; + if ((undefined)) (_console = console).log.apply(_console, arguments); + } /***/ } /******/ ]) diff --git a/dist/react-draggable.js.map b/dist/react-draggable.js.map index f0d3c11b..4bd20708 100644 --- a/dist/react-draggable.js.map +++ b/dist/react-draggable.js.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 369dfb5970cb0ccd6a54",".././index.js",".././lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}",".././~/classnames/index.js",".././~/object-assign/index.js",".././lib/utils/domFns.es6",".././lib/utils/shims.es6",".././lib/utils/getPrefix.es6",".././lib/utils/positionFns.es6",".././lib/DraggableCore.es6",".././lib/utils/log.es6"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA,OAAM,CAAC,OAAO,GAAG,mBAAO,CAAC,CAAiB,CAAC,CAAC;AAC5C,OAAM,CAAC,OAAO,CAAC,aAAa,GAAG,mBAAO,CAAC,EAAqB,CAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;kCCDnB,CAAO;;;;qCAC5B,CAAW;;;;uCACT,CAAY;;;;yCAChB,CAAe;;;;wCACW,CAAgB;;6CACV,CAAqB;;uCAChD,CAAe;;2CACb,EAAiB;;;;qCAC3B,EAAa;;;;;;;;KAMR,SAAS;aAAT,SAAS;;YAAT,SAAS;;;2BAAT,SAAS;;gCAAT,SAAS;;UAiH5B,KAAK,GAAG;;AAEN,eAAQ,EAAE,KAAK;;;AAGf,cAAO,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,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YAEqB;AACpB,oBAAa,EAAE,KAAK;AACpB,aAAM,EAAE,IAAI;AACZ,eAAQ,EAAE,KAAK;AACf,2BAAoB,EAAE,IAAI;AAC1B,aAAM,EAAE,IAAI;AACZ,WAAI,EAAE,IAAI;AACV,gBAAS,EAAE,IAAI;AACf,cAAO,EAAE,mBAAU,EAAE;AACrB,aAAM,EAAE,kBAAU,EAAE;AACpB,aAAM,EAAE,kBAAU,EAAE;AACpB,kBAAW,EAAE,uBAAU,EAAE;MAC1B;;;;UA/LkB,aAAa;IAAS,mBAAM,SAAS;;sBAArC,aAAa;;;;;;;;;;;;;;;;;;;sBC/BV,GAAG;;AAAZ,UAAS,GAAG,GAAG;AAC5B,OAAI,WAA2B,EAAE,OAAO,CAAC,GAAG,OAAX,OAAO,EAAQ,SAAS,CAAC,CAAC;EAC5D","file":"./dist/react-draggable.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 369dfb5970cb0ccd6a54\n **/","module.exports = require('./lib/Draggable');\nmodule.exports.DraggableCore = require('./lib/DraggableCore');\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","import {default as React, PropTypes} from 'react';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport assign from 'object-assign';\nimport {createUIEvent, createTransform} from './utils/domFns';\nimport {canDragX, canDragY, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport log from './utils/log';\n\n//\n// Define \n//\n\nexport default class Draggable extends DraggableCore {\n\n static displayName = 'Draggable';\n\n static propTypes = assign({}, DraggableCore.propTypes, {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.Number,\n right: PropTypes.Number,\n top: PropTypes.Number,\n bottom: PropTypes.Number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n /**\n * `start` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n start: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `zIndex` specifies the zIndex to use while dragging.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I have a zIndex
\n *
\n * );\n * }\n * });\n * ```\n */\n zIndex: PropTypes.number,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n });\n\n static defaultProps = assign({}, DraggableCore.defaultProps, {\n axis: 'both',\n bounds: false,\n start: {x: 0, y: 0},\n zIndex: NaN\n });\n\n state = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Current transform x and y.\n clientX: this.props.start.x, clientY: this.props.start.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(ReactDOM.findDOMNode(this) instanceof SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart = (e, coreEvent) => {\n log('Draggable: onDragStart: %j', coreEvent.position);\n\n // Short-circuit if user's callback killed it.\n let shouldStart = this.props.onStart(e, createUIEvent(this, coreEvent));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true});\n };\n\n onDrag = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreEvent.position);\n\n let uiEvent = createUIEvent(this, coreEvent);\n\n let newState = {\n clientX: uiEvent.position.left,\n clientY: uiEvent.position.top\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n let {clientX, clientY} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.clientX += this.state.slackX;\n newState.clientY += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n [newState.clientX, newState.clientY] = getBoundPosition(this, newState.clientX, newState.clientY);\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (clientX - newState.clientX);\n newState.slackY = this.state.slackY + (clientY - newState.clientY);\n\n // Update the event we fire.\n uiEvent.position.left = clientX;\n uiEvent.position.top = clientY;\n }\n\n // Short-circuit if user's callback killed it.\n let shouldUpdate = this.props.onDrag(e, uiEvent);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n let shouldStop = this.props.onStop(e, createUIEvent(this, coreEvent));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreEvent.position);\n\n this.setState({\n dragging: false,\n slackX: 0,\n slackY: 0\n });\n };\n\n render() {\n let style, svgTransform = null;\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n style = createTransform({\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n }, this.state.isElementSVG);\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = style;\n style = {};\n }\n\n // zIndex option\n if (this.state.dragging && !isNaN(this.props.zIndex)) {\n style.zIndex = this.props.zIndex;\n }\n\n // Mark with class while dragging\n let className = classNames((this.props.children.props.className || ''), 'react-draggable', {\n 'react-draggable-dragging': this.state.dragging,\n 'react-draggable-dragged': this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(React.Children.only(this.props.children), {\n className: className,\n style: assign({}, this.props.children.props.style, style),\n transform: svgTransform\n })}\n \n );\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/Draggable.es6\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}\n ** module id = 3\n ** module chunks = 0\n **/","/*!\n Copyright (c) 2015 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses += ' ' + arg;\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/classnames/index.js\n ** module id = 4\n ** module chunks = 0\n **/","/* eslint-disable no-unused-vars */\n'use strict';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nmodule.exports = Object.assign || function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (Object.getOwnPropertySymbols) {\n\t\t\tsymbols = Object.getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/object-assign/index.js\n ** module id = 5\n ** module chunks = 0\n **/","import {findInArray, isFunction, isNum, int} from './shims';\nimport browserPrefix from './getPrefix';\nimport assign from 'object-assign';\nimport ReactDOM from 'react-dom';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string) {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n return isFunction(el[method]);\n });\n }\n\n return el[matchesSelectorFunc].call(el, selector);\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function) {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function) {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: Node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n let computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: Node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n let computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: Node) {\n let height = node.clientHeight;\n let computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: Node) {\n let width = node.clientWidth;\n let computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\nexport function createTransform(position: Object, isSVG: ?boolean) {\n if (isSVG) return createSVGTransform(position);\n return createCSSTransform(position);\n}\n\nexport function createCSSTransform({x, y}: {x: number, y: number}) {\n // Replace unitless items with px\n let out = {transform: 'translate(' + x + 'px,' + y + 'px)'};\n // Add single prefixed property as well\n if (browserPrefix) {\n out[browserPrefix + 'Transform'] = out.transform;\n }\n return out;\n}\n\nexport function createSVGTransform({x, y}: {x: number, y: number}) {\n return 'translate(' + x + ',' + y + ')';\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\nlet userSelectStyle = ';user-select: none;';\nif (browserPrefix) {\n userSelectStyle += '-' + browserPrefix.toLowerCase() + '-user-select: none;';\n}\n\nexport function addUserSelectStyles() {\n let style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nexport function removeUserSelectStyles() {\n let style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nexport function styleHacks(childStyle = {}) {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n let touchHacks = {\n touchAction: 'none'\n };\n\n return assign(touchHacks, childStyle);\n}\n\n// Create an event exposed by \nexport function createCoreEvent(draggable, clientX, clientY) {\n // State changes are often (but not always!) async. We want the latest value.\n let state = draggable._pendingState || draggable.state;\n let isStart = !isNum(state.lastX);\n\n return {\n node: ReactDOM.findDOMNode(draggable),\n position: isStart ?\n // If this is our first move, use the clientX and clientY as last coords.\n {\n deltaX: 0, deltaY: 0,\n lastX: clientX, lastY: clientY,\n clientX: clientX, clientY: clientY\n } :\n // Otherwise calculate proper values.\n {\n deltaX: clientX - state.lastX, deltaY: clientY - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n clientX: clientX, clientY: clientY\n }\n };\n}\n\n// Create an event exposed by \nexport function createUIEvent(draggable, coreEvent) {\n return {\n node: ReactDOM.findDOMNode(draggable),\n position: {\n left: draggable.state.clientX + coreEvent.position.deltaX,\n top: draggable.state.clientY + coreEvent.position.deltaY\n },\n deltaX: coreEvent.position.deltaX,\n deltaY: coreEvent.position.deltaY\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/domFns.es6\n **/","// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array, callback) {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func) {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num) {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a) {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props, propName, componentName) {\n if (props[propName]) {\n throw new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/shims.es6\n **/","export default (function() {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n // Thanks David Walsh\n let styles = window.getComputedStyle(document.documentElement, ''),\n pre = (Array.prototype.slice\n .call(styles)\n .join('')\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])\n )[1];\n // 'ms' is not titlecased\n if(pre === undefined || pre === null) return '';\n if (pre === 'ms') return pre;\n if (pre === undefined || pre === null) return '';\n return pre.slice(0, 1).toUpperCase() + pre.slice(1);\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/getPrefix.es6\n **/","import {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {innerWidth, innerHeight, outerWidth, outerHeight} from './domFns';\n\nexport function getBoundPosition(draggable, clientX, clientY) {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [clientX, clientY];\n\n // Clone new bounds\n let bounds = cloneBounds(draggable.props.bounds);\n let node = ReactDOM.findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = document.querySelector(bounds);\n if (!boundNode) throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n let nodeStyle = window.getComputedStyle(node);\n let boundNodeStyle = window.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) clientX = Math.min(clientX, bounds.right);\n if (isNum(bounds.bottom)) clientY = Math.min(clientY, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) clientX = Math.max(clientX, bounds.left);\n if (isNum(bounds.top)) clientY = Math.max(clientY, bounds.top);\n\n return [clientX, clientY];\n}\n\nexport function snapToGrid(grid, pendingX, pendingY) {\n let x = Math.round(pendingX / grid[0]) * grid[0];\n let y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {clientX, clientY} positions from event.\nexport function getControlPosition(e) {\n let position = (e.targetTouches && e.targetTouches[0]) || e;\n return {\n clientX: position.clientX,\n clientY: position.clientY\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds) {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/positionFns.es6\n **/","import {default as React, PropTypes} from 'react';\nimport {matchesSelector, createCoreEvent, addEvent, removeEvent, addUserSelectStyles,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\n// Simple abstraction for dragging events names.\nlet eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I can't be dragged
\n *
\n * );\n * }\n * });\n * ```\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I snap to a 25 x 25 grid
\n *
\n * );\n * }\n * });\n * ```\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (due to that there's internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: null, lastY: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n removeEvent(document, eventsFor.mouse.move, this.handleDrag);\n removeEvent(document, eventsFor.touch.move, this.handleDrag);\n removeEvent(document, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(document, eventsFor.touch.stop, this.handleDragStop);\n removeEvent(document, 'scroll', this.handleScroll);\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n }\n\n handleDragStart = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n (this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n if (e.targetTouches){\n this.setState({touchIdentifier: e.targetTouches[0].identifier});\n }\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles();\n\n // Get the current drag point from the event. This is used as the offset.\n let {clientX, clientY} = getControlPosition(e);\n\n // Create an event object with all the data parents need to make a decision here.\n let coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDragStart: %j', coreEvent.position);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n let shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: clientX,\n lastY: clientY,\n // Stored so we can adjust our offset if scrolled.\n scrollX: document.body.scrollLeft,\n scrollY: document.body.scrollTop\n });\n\n // Translate el on page scroll.\n addEvent(document, 'scroll', this.handleScroll);\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag = (e) => {\n // Return if this is a touch event, but not the correct one for this element\n if (e.targetTouches && (e.targetTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n let {clientX, clientY} = getControlPosition(e);\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = clientX - this.state.lastX, deltaY = clientY - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n clientX = this.state.lastX + deltaX, clientY = this.state.lastY + deltaY;\n }\n\n let coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDrag: %j', coreEvent.position);\n\n\n // Call event handler. If it returns explicit false, trigger end.\n let shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n this.handleDragStop({});\n return;\n }\n\n this.setState({\n lastX: clientX,\n lastY: clientY\n });\n };\n\n handleDragStop = (e) => {\n if (!this.state.dragging) return;\n\n // Short circuit if this is not the correct touch event. `changedTouches` contains all\n // touch points that have been removed from the surface.\n if (e.changedTouches && (e.changedTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n\n let {clientX, clientY} = getControlPosition(e);\n let coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDragStop: %j', coreEvent.position);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: null,\n lastY: null\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(document, 'scroll', this.handleScroll);\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n // When the user scrolls, adjust internal state so the draggable moves along the page properly.\n // This only fires when a drag is active.\n handleScroll = (e) => {\n let s = this.state, x = document.body.scrollLeft, y = document.body.scrollTop;\n\n // Create the usual event, but make the scroll offset our deltas.\n let coreEvent = createCoreEvent(this);\n coreEvent.position.deltaX = x - s.scrollX;\n coreEvent.position.deltaY = y - s.scrollY;\n\n this.setState({\n lastX: s.lastX + coreEvent.position.deltaX,\n lastY: s.lastY + coreEvent.position.deltaY\n });\n\n this.props.onDrag(e, coreEvent);\n };\n\n // On mousedown, consider the drag started.\n onMouseDown = (e) => {\n // HACK: Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.\n // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.\n // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/\n if (dragEventFor === eventsFor.touch) {\n return e.preventDefault();\n }\n\n return this.handleDragStart(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.handleDragStop,\n onTouchEnd: this.handleDragStop\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/DraggableCore.es6\n **/","export default function log() {\n if (process.env.DRAGGABLE_DEBUG) console.log(...arguments);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/log.es6\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap e87cfc73994e4a79eb79",".././index.js",".././lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}",".././~/classnames/index.js",".././lib/utils/domFns.es6",".././lib/utils/shims.es6",".././lib/utils/getPrefix.es6",".././lib/utils/positionFns.es6",".././lib/DraggableCore.es6",".././lib/utils/log.es6"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA,QAAO,OAAP,GAAiB,oBAAQ,CAAR,EAA2B,OAA3B;AACjB,QAAO,OAAP,CAAe,aAAf,GAA+B,oBAAQ,CAAR,EAA+B,OAA/B,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCwBV;;;;;;;;;;;;;;wMAqHnB,QAAwB;;AAEtB,iBAAU,KAAV;;;AAGA,gBAAS,KAAT;;;AAGA,gBAAS,MAAK,KAAL,CAAW,KAAX,CAAiB,CAAjB,EAAoB,SAAS,MAAK,KAAL,CAAW,KAAX,CAAiB,CAAjB;;;AAGtC,eAAQ,CAAR,EAAW,QAAQ,CAAR;;;AAGX,qBAAc,KAAd;cAcF,cAAgC,UAAC,CAAD,EAAI,SAAJ,EAAkB;AAChD,0BAAI,4BAAJ,EAAkC,UAAU,QAAV,CAAlC;;;AADgD,WAI5C,cAAc,MAAK,KAAL,CAAW,OAAX,CAAmB,CAAnB,EAAsB,kCAAoB,SAApB,CAAtB,CAAd;;AAJ4C,WAM5C,gBAAgB,KAAhB,EAAuB,OAAO,KAAP,CAA3B;;AAEA,aAAK,QAAL,CAAc,EAAC,UAAU,IAAV,EAAgB,SAAS,IAAT,EAA/B,EARgD;MAAlB,QAWhC,SAA2B,UAAC,CAAD,EAAI,SAAJ,EAAkB;AAC3C,WAAI,CAAC,MAAK,KAAL,CAAW,QAAX,EAAqB,O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;AACX,qBAAY,KAAK,cAAL;QARP,CAAP,CAHqB;;;;UArXJ;GAAsB,gBAAM,SAAN;;AAAtB,eAEZ,cAAc;AAFF,eAIZ,YAAY;;;;;;;AAOjB,kBAAe,iBAAU,IAAV;;;;;;;;;;;;;;;;;;;;AAoBf,aAAU,iBAAU,IAAV;;;;;;;AAOV,yBAAsB,iBAAU,IAAV;;;;;;;;;;;;;;;;;;;AAmBtB,SAAM,iBAAU,OAAV,CAAkB,iBAAU,MAAV,CAAxB;;;;;;;;;;;;;;;;;;;;;;AAsBA,WAAQ,iBAAU,MAAV;;;;;;;;;;;;;;;;;;;;;;AAsBR,WAAQ,iBAAU,MAAV;;;;;;;;;;;;;;;;;;;;;AAqBR,YAAS,iBAAU,IAAV;;;;;;;;;;;;;;;;;;;;;AAqBT,WAAQ,iBAAU,IAAV;;;;;;;;;;;;;;;;;;;;AAoBR,WAAQ,iBAAU,IAAV;;;;;;AAMR,gBAAa,iBAAU,IAAV;;;;;AAKb,8BA1KiB;AA2KjB,0BA3KiB;AA4KjB,8BA5KiB;;AAJA,eAmLZ,eAAe;AACpB,kBAAe,KAAf;AACA,WAAQ,IAAR;AACA,aAAU,KAAV;AACA,yBAAsB,IAAtB;AACA,WAAQ,IAAR;AACA,SAAM,IAAN;AACA,cAAW,IAAX;AACA,YAAS,mBAAU,EAAV;AACT,WAAQ,kBAAU,EAAV;AACR,WAAQ,kBAAU,EAAV;AACR,gBAAa,uBAAU,EAAV;;mBA9LI,c;;;;;;;;;;;mBCtCG;AAAT,UAAS,GAAT,GAA2B;;;AACxC,OAAI,aAA6B,qBAAQ,GAAR,4BAAjC","file":"./dist/react-draggable.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap e87cfc73994e4a79eb79\n **/","module.exports = require('./lib/Draggable').default;\nmodule.exports.DraggableCore = require('./lib/DraggableCore').default;\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","// @flow\nimport {default as React, PropTypes} from 'react';\nimport ReactDOM from 'react-dom';\n// $FlowIgnore\nimport classNames from 'classnames';\nimport {createUIEvent, createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport log from './utils/log';\n\nimport type {CoreEvent} from './utils/domFns';\nexport type CoreEventHandler = (e: Event, coreEvent: CoreEvent) => void | false;\nexport type DraggableState = {\n dragging: boolean,\n dragged: boolean,\n clientX: number, clientY: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\n//\n// Define \n//\n\nexport default class Draggable extends React.Component {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.Number,\n right: PropTypes.Number,\n top: PropTypes.Number,\n bottom: PropTypes.Number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n /**\n * `start` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n start: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `zIndex` specifies the zIndex to use while dragging.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I have a zIndex
\n *
\n * );\n * }\n * });\n * ```\n */\n zIndex: PropTypes.number,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n start: {x: 0, y: 0},\n zIndex: NaN\n };\n\n state: DraggableState = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n clientX: this.props.start.x, clientY: this.props.start.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(ReactDOM.findDOMNode(this) instanceof SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: CoreEventHandler = (e, coreEvent) => {\n log('Draggable: onDragStart: %j', coreEvent.position);\n\n // Short-circuit if user's callback killed it.\n let shouldStart = this.props.onStart(e, createUIEvent(this, coreEvent));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: CoreEventHandler = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreEvent.position);\n\n let uiEvent = createUIEvent(this, coreEvent);\n\n let newState = {\n clientX: uiEvent.position.left,\n clientY: uiEvent.position.top\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n let {clientX, clientY} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.clientX += this.state.slackX;\n newState.clientY += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n [newState.clientX, newState.clientY] = getBoundPosition(this, newState.clientX, newState.clientY);\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (clientX - newState.clientX);\n newState.slackY = this.state.slackY + (clientY - newState.clientY);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiEvent.position.left = clientX;\n uiEvent.position.top = clientY;\n uiEvent.deltaX = newState.clientX - this.state.clientX;\n uiEvent.deltaY = newState.clientY - this.state.clientY;\n }\n\n // Short-circuit if user's callback killed it.\n let shouldUpdate = this.props.onDrag(e, uiEvent);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: CoreEventHandler = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n let shouldStop = this.props.onStop(e, createUIEvent(this, coreEvent));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreEvent.position);\n\n this.setState({\n dragging: false,\n slackX: 0,\n slackY: 0\n });\n };\n\n render(): ReactElement {\n let style = {}, svgTransform = null;\n\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts);\n } else {\n style = createCSSTransform(transformOpts);\n }\n\n // zIndex option\n if (this.state.dragging && !isNaN(this.props.zIndex)) {\n style.zIndex = this.props.zIndex;\n }\n\n // Mark with class while dragging\n let className = classNames((this.props.children.props.className || ''), 'react-draggable', {\n 'react-draggable-dragging': this.state.dragging,\n 'react-draggable-dragged': this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(React.Children.only(this.props.children), {\n className: className,\n style: {...this.props.children.props.style, ...style},\n transform: svgTransform\n })}\n \n );\n }\n}\n\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/Draggable.es6\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}\n ** module id = 3\n ** module chunks = 0\n **/","/*!\n Copyright (c) 2015 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses += ' ' + arg;\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/classnames/index.js\n ** module id = 4\n ** module chunks = 0\n **/","// @flow\nimport {findInArray, isFunction, isNum, int} from './shims';\nimport browserPrefix from './getPrefix';\nimport ReactDOM from 'react-dom';\n\nimport type Draggable from '../Draggable';\nimport type DraggableCore from '../DraggableCore';\n\nexport type CoreEvent = {\n node: HTMLElement,\n position: {\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n clientX: number, clientY: number\n }\n};\n\nexport type UIEvent = {\n node: HTMLElement,\n position: {\n left: number, top: number\n },\n deltaX: number, deltaY: number\n};\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: HTMLElement, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc].call(el, selector);\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n let computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n let computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n let computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n let computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\nexport function createCSSTransform({x, y}: {x: number, y: number}): Object {\n // Replace unitless items with px\n let out = {transform: 'translate(' + x + 'px,' + y + 'px)'};\n // Add single prefixed property as well\n if (browserPrefix) {\n out[browserPrefix + 'Transform'] = out.transform;\n }\n return out;\n}\n\nexport function createSVGTransform({x, y}: {x: number, y: number}): string {\n return 'translate(' + x + ',' + y + ')';\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\nlet userSelectStyle = ';user-select: none;';\nif (browserPrefix) {\n userSelectStyle += '-' + browserPrefix.toLowerCase() + '-user-select: none;';\n}\n\nexport function addUserSelectStyles() {\n let style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nexport function removeUserSelectStyles() {\n let style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\n// Create an event exposed by \nexport function createCoreEvent(draggable: DraggableCore, clientX: number, clientY: number): CoreEvent {\n // State changes are often (but not always!) async. We want the latest value.\n let state = draggable._pendingState || draggable.state;\n let isStart = !isNum(state.lastX);\n\n return {\n node: ReactDOM.findDOMNode(draggable),\n position: isStart ?\n // If this is our first move, use the clientX and clientY as last coords.\n {\n deltaX: 0, deltaY: 0,\n lastX: clientX, lastY: clientY,\n clientX: clientX, clientY: clientY\n } :\n // Otherwise calculate proper values.\n {\n deltaX: clientX - state.lastX, deltaY: clientY - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n clientX: clientX, clientY: clientY\n }\n };\n}\n\n// Create an event exposed by \nexport function createUIEvent(draggable: Draggable, coreEvent: CoreEvent): UIEvent {\n return {\n node: ReactDOM.findDOMNode(draggable),\n position: {\n left: draggable.state.clientX + coreEvent.position.deltaX,\n top: draggable.state.clientY + coreEvent.position.deltaY\n },\n deltaX: coreEvent.position.deltaX,\n deltaY: coreEvent.position.deltaY\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/domFns.es6\n **/","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n throw new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/shims.es6\n **/","// @flow\nexport function generatePrefix(): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n // Thanks David Walsh\n let styles = window.getComputedStyle(document.documentElement, ''),\n pre = (Array.prototype.slice\n .call(styles)\n .join('')\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' ? ['', 'o'] : [])\n )[1];\n // 'ms' is not titlecased\n if (pre === undefined || pre === null) return '';\n if (pre === 'ms') return pre;\n if (pre === undefined || pre === null) return '';\n return pre.slice(0, 1).toUpperCase() + pre.slice(1);\n}\n\nexport default generatePrefix();\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/getPrefix.es6\n **/","// @flow\nimport React from 'react';\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {innerWidth, innerHeight, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nexport type ControlPosition = {\n clientX: number, clientY: number\n};\nexport type Bounds = {\n left: number, top: number, right: number, bottom: number\n};\n\nexport function getBoundPosition(draggable: Draggable, clientX: number, clientY: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [clientX, clientY];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n let node = ReactDOM.findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = document.querySelector(bounds);\n if (!boundNode) throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n let nodeStyle = window.getComputedStyle(node);\n let boundNodeStyle = window.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) clientX = Math.min(clientX, bounds.right);\n if (isNum(bounds.bottom)) clientY = Math.min(clientY, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) clientX = Math.max(clientX, bounds.left);\n if (isNum(bounds.top)) clientY = Math.max(clientY, bounds.top);\n\n return [clientX, clientY];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n let x = Math.round(pendingX / grid[0]) * grid[0];\n let y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: React.Component): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: React.Component): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {clientX, clientY} positions from event.\nexport function getControlPosition(e: Event): ControlPosition {\n let position = (e.targetTouches && e.targetTouches[0]) || e;\n return {\n clientX: position.clientX,\n clientY: position.clientY\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/positionFns.es6\n **/","// @flow\nimport {default as React, PropTypes} from 'react';\nimport {matchesSelector, createCoreEvent, addEvent, removeEvent, addUserSelectStyles,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype EventHandler = (e: Event) => void;\ntype CoreState = {\n dragging: boolean,\n lastX: ?number,\n lastY: ?number\n};\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I can't be dragged
\n *
\n * );\n * }\n * });\n * ```\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I snap to a 25 x 25 grid
\n *
\n * );\n * }\n * });\n * ```\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (due to that there's internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state: CoreState = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: null, lastY: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n removeEvent(document, eventsFor.mouse.move, this.handleDrag);\n removeEvent(document, eventsFor.touch.move, this.handleDrag);\n removeEvent(document, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(document, eventsFor.touch.stop, this.handleDragStop);\n removeEvent(document, 'scroll', this.handleScroll);\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n }\n\n handleDragStart: EventHandler = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n (this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n if (e.targetTouches){\n this.setState({touchIdentifier: e.targetTouches[0].identifier});\n }\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles();\n\n // Get the current drag point from the event. This is used as the offset.\n let {clientX, clientY} = getControlPosition(e);\n\n // Create an event object with all the data parents need to make a decision here.\n let coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDragStart: %j', coreEvent.position);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n let shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: clientX,\n lastY: clientY,\n // Stored so we can adjust our offset if scrolled.\n scrollX: document.body.scrollLeft,\n scrollY: document.body.scrollTop\n });\n\n // Translate el on page scroll.\n addEvent(document, 'scroll', this.handleScroll);\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler = (e) => {\n // Return if this is a touch event, but not the correct one for this element\n if (e.targetTouches && (e.targetTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n let {clientX, clientY} = getControlPosition(e);\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = clientX - this.state.lastX, deltaY = clientY - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n clientX = this.state.lastX + deltaX, clientY = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDrag: %j', coreEvent.position);\n\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n this.handleDragStop({});\n return;\n }\n\n this.setState({\n lastX: clientX,\n lastY: clientY\n });\n };\n\n handleDragStop: EventHandler = (e) => {\n if (!this.state.dragging) return;\n\n // Short circuit if this is not the correct touch event. `changedTouches` contains all\n // touch points that have been removed from the surface.\n if (e.changedTouches && (e.changedTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n\n let {clientX, clientY} = getControlPosition(e);\n const coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDragStop: %j', coreEvent.position);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: null,\n lastY: null\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(document, 'scroll', this.handleScroll);\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n // When the user scrolls, adjust internal state so the draggable moves along the page properly.\n // This only fires when a drag is active.\n handleScroll: EventHandler = (e) => {\n const s = this.state, x = document.body.scrollLeft, y = document.body.scrollTop;\n\n // Create the usual event, but make the scroll offset our deltas.\n let coreEvent = createCoreEvent(this);\n coreEvent.position.deltaX = x - s.scrollX;\n coreEvent.position.deltaY = y - s.scrollY;\n\n this.setState({\n lastX: s.lastX + coreEvent.position.deltaX,\n lastY: s.lastY + coreEvent.position.deltaY\n });\n\n this.props.onDrag(e, coreEvent);\n };\n\n // On mousedown, consider the drag started.\n onMouseDown: EventHandler = (e) => {\n // HACK: Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.\n // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.\n // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/\n if (dragEventFor === eventsFor.touch) {\n return e.preventDefault();\n }\n\n return this.handleDragStart(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n render(): ReactElement {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.handleDragStop,\n onTouchEnd: this.handleDragStop\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/DraggableCore.es6\n **/","// @flow\nexport default function log(...args: any) {\n if (process.env.DRAGGABLE_DEBUG) console.log(...args);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/log.es6\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/react-draggable.min.js b/dist/react-draggable.min.js index 581cd6ef..42ee975c 100644 --- a/dist/react-draggable.min.js +++ b/dist/react-draggable.min.js @@ -1,2 +1,2 @@ -!function(root,factory){"object"==typeof exports&&"object"==typeof module?module.exports=factory(require("react"),require("react-dom")):"function"==typeof define&&define.amd?define(["react","react-dom"],factory):"object"==typeof exports?exports.ReactDraggable=factory(require("react"),require("react-dom")):root.ReactDraggable=factory(root.React,root.ReactDOM)}(this,function(__WEBPACK_EXTERNAL_MODULE_2__,__WEBPACK_EXTERNAL_MODULE_3__){return function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports,__webpack_require__){"use strict";module.exports=__webpack_require__(1),module.exports.DraggableCore=__webpack_require__(10)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;ii;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]}function isFunction(func){return"function"==typeof func||"[object Function]"===Object.prototype.toString.call(func)}function isNum(num){return"number"==typeof num&&!isNaN(num)}function int(a){return parseInt(a,10)}function dontSetMe(props,propName,componentName){if(props[propName])throw new Error("Invalid prop "+propName+" passed to "+componentName+" - do not set this, set it on the child.")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.findInArray=findInArray,exports.isFunction=isFunction,exports.isNum=isNum,exports["int"]=int,exports.dontSetMe=dontSetMe},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=function(){if("undefined"==typeof window||"undefined"==typeof window.document)return"";var styles=window.getComputedStyle(document.documentElement,""),pre=(Array.prototype.slice.call(styles).join("").match(/-(moz|webkit|ms)-/)||""===styles.OLink&&["","o"])[1];return void 0===pre||null===pre?"":"ms"===pre?pre:void 0===pre||null===pre?"":pre.slice(0,1).toUpperCase()+pre.slice(1)}(),module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function getBoundPosition(draggable,clientX,clientY){if(!draggable.props.bounds)return[clientX,clientY];var bounds=cloneBounds(draggable.props.bounds),node=_reactDom2["default"].findDOMNode(draggable);if("string"==typeof bounds){var boundNode=void 0;if("parent"===bounds)boundNode=node.parentNode;else if(boundNode=document.querySelector(bounds),!boundNode)throw new Error('Bounds selector "'+bounds+'" could not find an element.');var nodeStyle=window.getComputedStyle(node),boundNodeStyle=window.getComputedStyle(boundNode);bounds={left:-node.offsetLeft+(0,_shims["int"])(boundNodeStyle.paddingLeft)+(0,_shims["int"])(nodeStyle.borderLeftWidth)+(0,_shims["int"])(nodeStyle.marginLeft),top:-node.offsetTop+(0,_shims["int"])(boundNodeStyle.paddingTop)+(0,_shims["int"])(nodeStyle.borderTopWidth)+(0,_shims["int"])(nodeStyle.marginTop),right:(0,_domFns.innerWidth)(boundNode)-(0,_domFns.outerWidth)(node)-node.offsetLeft,bottom:(0,_domFns.innerHeight)(boundNode)-(0,_domFns.outerHeight)(node)-node.offsetTop}}return(0,_shims.isNum)(bounds.right)&&(clientX=Math.min(clientX,bounds.right)),(0,_shims.isNum)(bounds.bottom)&&(clientY=Math.min(clientY,bounds.bottom)),(0,_shims.isNum)(bounds.left)&&(clientX=Math.max(clientX,bounds.left)),(0,_shims.isNum)(bounds.top)&&(clientY=Math.max(clientY,bounds.top)),[clientX,clientY]}function snapToGrid(grid,pendingX,pendingY){var x=Math.round(pendingX/grid[0])*grid[0],y=Math.round(pendingY/grid[1])*grid[1];return[x,y]}function canDragX(draggable){return"both"===draggable.props.axis||"x"===draggable.props.axis}function canDragY(draggable){return"both"===draggable.props.axis||"y"===draggable.props.axis}function getControlPosition(e){var position=e.targetTouches&&e.targetTouches[0]||e;return{clientX:position.clientX,clientY:position.clientY}}function cloneBounds(bounds){return{left:bounds.left,top:bounds.top,right:bounds.right,bottom:bounds.bottom}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBoundPosition=getBoundPosition,exports.snapToGrid=snapToGrid,exports.canDragX=canDragX,exports.canDragY=canDragY,exports.getControlPosition=getControlPosition;var _shims=__webpack_require__(7),_reactDom=__webpack_require__(3),_reactDom2=_interopRequireDefault(_reactDom),_domFns=__webpack_require__(6)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i["return"]&&_i["return"]()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i_key;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_Object$getPrototypeO=Object.getPrototypeOf(Draggable)).call.apply(_Object$getPrototypeO,[this].concat(args))),_this.state={dragging:!1,dragged:!1,clientX:_this.props.start.x,clientY:_this.props.start.y,slackX:0,slackY:0,isElementSVG:!1},_this.onDragStart=function(e,coreEvent){(0,_log2["default"])("Draggable: onDragStart: %j",coreEvent.position);var shouldStart=_this.props.onStart(e,(0,_domFns.createUIEvent)(_this,coreEvent));return shouldStart===!1?!1:void _this.setState({dragging:!0,dragged:!0})},_this.onDrag=function(e,coreEvent){if(!_this.state.dragging)return!1;(0,_log2["default"])("Draggable: onDrag: %j",coreEvent.position);var uiEvent=(0,_domFns.createUIEvent)(_this,coreEvent),newState={clientX:uiEvent.position.left,clientY:uiEvent.position.top};if(_this.props.bounds){var _clientX=newState.clientX,_clientY=newState.clientY;newState.clientX+=_this.state.slackX,newState.clientY+=_this.state.slackY;var _getBoundPosition=(0,_positionFns.getBoundPosition)(_this,newState.clientX,newState.clientY),_getBoundPosition2=_slicedToArray(_getBoundPosition,2);newState.clientX=_getBoundPosition2[0],newState.clientY=_getBoundPosition2[1],newState.slackX=_this.state.slackX+(_clientX-newState.clientX),newState.slackY=_this.state.slackY+(_clientY-newState.clientY),uiEvent.position.left=_clientX,uiEvent.position.top=_clientY,uiEvent.deltaX=newState.clientX-_this.state.clientX,uiEvent.deltaY=newState.clientY-_this.state.clientY}var shouldUpdate=_this.props.onDrag(e,uiEvent);return shouldUpdate===!1?!1:void _this.setState(newState)},_this.onDragStop=function(e,coreEvent){if(!_this.state.dragging)return!1;var shouldStop=_this.props.onStop(e,(0,_domFns.createUIEvent)(_this,coreEvent));return shouldStop===!1?!1:((0,_log2["default"])("Draggable: onDragStop: %j",coreEvent.position),void _this.setState({dragging:!1,slackX:0,slackY:0}))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(Draggable,_React$Component),_createClass(Draggable,[{key:"componentDidMount",value:function(){_reactDom2["default"].findDOMNode(this)instanceof SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var style={},svgTransform=null,transformOpts={x:(0,_positionFns.canDragX)(this)?this.state.clientX:this.props.start.x,y:(0,_positionFns.canDragY)(this)?this.state.clientY:this.props.start.y};this.state.isElementSVG?svgTransform=(0,_domFns.createSVGTransform)(transformOpts):style=(0,_domFns.createCSSTransform)(transformOpts),this.state.dragging&&!isNaN(this.props.zIndex)&&(style.zIndex=this.props.zIndex);var className=(0,_classnames2["default"])(this.props.children.props.className||"","react-draggable",{"react-draggable-dragging":this.state.dragging,"react-draggable-dragged":this.state.dragged});return _react2["default"].createElement(_DraggableCore2["default"],_extends({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),_react2["default"].cloneElement(_react2["default"].Children.only(this.props.children),{className:className,style:_extends({},this.props.children.props.style,style),transform:svgTransform}))}}]),Draggable}(_react2["default"].Component);Draggable.displayName="Draggable",Draggable.propTypes=_extends({},_DraggableCore2["default"].propTypes,{axis:_react.PropTypes.oneOf(["both","x","y","none"]),bounds:_react.PropTypes.oneOfType([_react.PropTypes.shape({left:_react.PropTypes.Number,right:_react.PropTypes.Number,top:_react.PropTypes.Number,bottom:_react.PropTypes.Number}),_react.PropTypes.string,_react.PropTypes.oneOf([!1])]),start:_react.PropTypes.shape({x:_react.PropTypes.number,y:_react.PropTypes.number}),zIndex:_react.PropTypes.number,className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe}),Draggable.defaultProps=_extends({},_DraggableCore2["default"].defaultProps,{axis:"both",bounds:!1,start:{x:0,y:0},zIndex:NaN}),exports["default"]=Draggable},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_3__},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";function classNames(){for(var classes="",i=0;ii;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]}function isFunction(func){return"function"==typeof func||"[object Function]"===Object.prototype.toString.call(func)}function isNum(num){return"number"==typeof num&&!isNaN(num)}function int(a){return parseInt(a,10)}function dontSetMe(props,propName,componentName){if(props[propName])throw new Error("Invalid prop "+propName+" passed to "+componentName+" - do not set this, set it on the child.")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.findInArray=findInArray,exports.isFunction=isFunction,exports.isNum=isNum,exports["int"]=int,exports.dontSetMe=dontSetMe},function(module,exports){"use strict";function generatePrefix(){if("undefined"==typeof window||"undefined"==typeof window.document)return"";var styles=window.getComputedStyle(document.documentElement,""),pre=(Array.prototype.slice.call(styles).join("").match(/-(moz|webkit|ms)-/)||(""===styles.OLink?["","o"]:[]))[1];return void 0===pre||null===pre?"":"ms"===pre?pre:void 0===pre||null===pre?"":pre.slice(0,1).toUpperCase()+pre.slice(1)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.generatePrefix=generatePrefix,exports["default"]=generatePrefix()},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function getBoundPosition(draggable,clientX,clientY){if(!draggable.props.bounds)return[clientX,clientY];var bounds=draggable.props.bounds;bounds="string"==typeof bounds?bounds:cloneBounds(bounds);var node=_reactDom2["default"].findDOMNode(draggable);if("string"==typeof bounds){var boundNode=void 0;if("parent"===bounds)boundNode=node.parentNode;else if(boundNode=document.querySelector(bounds),!boundNode)throw new Error('Bounds selector "'+bounds+'" could not find an element.');var nodeStyle=window.getComputedStyle(node),boundNodeStyle=window.getComputedStyle(boundNode);bounds={left:-node.offsetLeft+(0,_shims["int"])(boundNodeStyle.paddingLeft)+(0,_shims["int"])(nodeStyle.borderLeftWidth)+(0,_shims["int"])(nodeStyle.marginLeft),top:-node.offsetTop+(0,_shims["int"])(boundNodeStyle.paddingTop)+(0,_shims["int"])(nodeStyle.borderTopWidth)+(0,_shims["int"])(nodeStyle.marginTop),right:(0,_domFns.innerWidth)(boundNode)-(0,_domFns.outerWidth)(node)-node.offsetLeft,bottom:(0,_domFns.innerHeight)(boundNode)-(0,_domFns.outerHeight)(node)-node.offsetTop}}return(0,_shims.isNum)(bounds.right)&&(clientX=Math.min(clientX,bounds.right)),(0,_shims.isNum)(bounds.bottom)&&(clientY=Math.min(clientY,bounds.bottom)),(0,_shims.isNum)(bounds.left)&&(clientX=Math.max(clientX,bounds.left)),(0,_shims.isNum)(bounds.top)&&(clientY=Math.max(clientY,bounds.top)),[clientX,clientY]}function snapToGrid(grid,pendingX,pendingY){var x=Math.round(pendingX/grid[0])*grid[0],y=Math.round(pendingY/grid[1])*grid[1];return[x,y]}function canDragX(draggable){return"both"===draggable.props.axis||"x"===draggable.props.axis}function canDragY(draggable){return"both"===draggable.props.axis||"y"===draggable.props.axis}function getControlPosition(e){var position=e.targetTouches&&e.targetTouches[0]||e;return{clientX:position.clientX,clientY:position.clientY}}function cloneBounds(bounds){return{left:bounds.left,top:bounds.top,right:bounds.right,bottom:bounds.bottom}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBoundPosition=getBoundPosition,exports.snapToGrid=snapToGrid,exports.canDragX=canDragX,exports.canDragY=canDragY,exports.getControlPosition=getControlPosition;var _react=__webpack_require__(2),_shims=(_interopRequireDefault(_react),__webpack_require__(6)),_reactDom=__webpack_require__(3),_reactDom2=_interopRequireDefault(_reactDom),_domFns=__webpack_require__(5)},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function sliceIterator(arr,i){var _arr=[],_n=!0,_d=!1,_e=void 0;try{for(var _s,_i=arr[Symbol.iterator]();!(_n=(_s=_i.next()).done)&&(_arr.push(_s.value),!i||_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{!_n&&_i["return"]&&_i["return"]()}finally{if(_d)throw _e}}return _arr}return function(arr,i){if(Array.isArray(arr))return arr;if(Symbol.iterator in Object(arr))return sliceIterator(arr,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function defineProperties(target,props){for(var i=0;i_key;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_Object$getPrototypeO=Object.getPrototypeOf(DraggableCore)).call.apply(_Object$getPrototypeO,[this].concat(args))),_this.state={dragging:!1,lastX:null,lastY:null},_this.handleDragStart=function(e){if(_this.props.onMouseDown(e),!_this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;if(!(_this.props.disabled||_this.props.handle&&!(0,_domFns.matchesSelector)(e.target,_this.props.handle)||_this.props.cancel&&(0,_domFns.matchesSelector)(e.target,_this.props.cancel))){e.targetTouches&&_this.setState({touchIdentifier:e.targetTouches[0].identifier}),_this.props.enableUserSelectHack&&(0,_domFns.addUserSelectStyles)();var _getControlPosition=(0,_positionFns.getControlPosition)(e),clientX=_getControlPosition.clientX,clientY=_getControlPosition.clientY,coreEvent=(0,_domFns.createCoreEvent)(_this,clientX,clientY);(0,_log2["default"])("DraggableCore: handleDragStart: %j",coreEvent.position),(0,_log2["default"])("calling",_this.props.onStart);var shouldUpdate=_this.props.onStart(e,coreEvent);shouldUpdate!==!1&&(_this.setState({dragging:!0,lastX:clientX,lastY:clientY,scrollX:document.body.scrollLeft,scrollY:document.body.scrollTop}),(0,_domFns.addEvent)(document,"scroll",_this.handleScroll),(0,_domFns.addEvent)(document,dragEventFor.move,_this.handleDrag),(0,_domFns.addEvent)(document,dragEventFor.stop,_this.handleDragStop))}},_this.handleDrag=function(e){if(!e.targetTouches||e.targetTouches[0].identifier===_this.state.touchIdentifier){var _getControlPosition2=(0,_positionFns.getControlPosition)(e),clientX=_getControlPosition2.clientX,clientY=_getControlPosition2.clientY;if(Array.isArray(_this.props.grid)){var deltaX=clientX-_this.state.lastX,deltaY=clientY-_this.state.lastY,_snapToGrid=(0,_positionFns.snapToGrid)(_this.props.grid,deltaX,deltaY),_snapToGrid2=_slicedToArray(_snapToGrid,2);if(deltaX=_snapToGrid2[0],deltaY=_snapToGrid2[1],!deltaX&&!deltaY)return;clientX=_this.state.lastX+deltaX,clientY=_this.state.lastY+deltaY}var coreEvent=(0,_domFns.createCoreEvent)(_this,clientX,clientY);(0,_log2["default"])("DraggableCore: handleDrag: %j",coreEvent.position);var shouldUpdate=_this.props.onDrag(e,coreEvent);return shouldUpdate===!1?void _this.handleDragStop({}):void _this.setState({lastX:clientX,lastY:clientY})}},_this.handleDragStop=function(e){if(_this.state.dragging&&(!e.changedTouches||e.changedTouches[0].identifier===_this.state.touchIdentifier)){_this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)();var _getControlPosition3=(0,_positionFns.getControlPosition)(e),clientX=_getControlPosition3.clientX,clientY=_getControlPosition3.clientY,coreEvent=(0,_domFns.createCoreEvent)(_this,clientX,clientY);(0,_log2["default"])("DraggableCore: handleDragStop: %j",coreEvent.position),_this.setState({dragging:!1,lastX:null,lastY:null}),_this.props.onStop(e,coreEvent),(0,_log2["default"])("DraggableCore: Removing handlers"),(0,_domFns.removeEvent)(document,"scroll",_this.handleScroll),(0,_domFns.removeEvent)(document,dragEventFor.move,_this.handleDrag),(0,_domFns.removeEvent)(document,dragEventFor.stop,_this.handleDragStop)}},_this.handleScroll=function(e){var s=_this.state,x=document.body.scrollLeft,y=document.body.scrollTop,coreEvent=(0,_domFns.createCoreEvent)(_this);coreEvent.position.deltaX=x-s.scrollX,coreEvent.position.deltaY=y-s.scrollY,_this.setState({lastX:s.lastX+coreEvent.position.deltaX,lastY:s.lastY+coreEvent.position.deltaY}),_this.props.onDrag(e,coreEvent)},_this.onMouseDown=function(e){return dragEventFor===eventsFor.touch?e.preventDefault():_this.handleDragStart(e)},_this.onTouchStart=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStart(e)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(DraggableCore,_React$Component),_createClass(DraggableCore,[{key:"componentWillUnmount",value:function(){(0,_domFns.removeEvent)(document,eventsFor.mouse.move,this.handleDrag),(0,_domFns.removeEvent)(document,eventsFor.touch.move,this.handleDrag),(0,_domFns.removeEvent)(document,eventsFor.mouse.stop,this.handleDragStop),(0,_domFns.removeEvent)(document,eventsFor.touch.stop,this.handleDragStop),(0,_domFns.removeEvent)(document,"scroll",this.handleScroll),this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)()}},{key:"render",value:function(){return _react2["default"].cloneElement(_react2["default"].Children.only(this.props.children),{style:(0,_domFns.styleHacks)(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.handleDragStop,onTouchEnd:this.handleDragStop})}}]),DraggableCore}(_react2["default"].Component);DraggableCore.displayName="DraggableCore",DraggableCore.propTypes={allowAnyClick:_react.PropTypes.bool,disabled:_react.PropTypes.bool,enableUserSelectHack:_react.PropTypes.bool,grid:_react.PropTypes.arrayOf(_react.PropTypes.number),handle:_react.PropTypes.string,cancel:_react.PropTypes.string,onStart:_react.PropTypes.func,onDrag:_react.PropTypes.func,onStop:_react.PropTypes.func,onMouseDown:_react.PropTypes.func,className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe},DraggableCore.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}},exports["default"]=DraggableCore},function(module,exports,__webpack_require__){"use strict";function log(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=log}])}); //# sourceMappingURL=dist/react-draggable.min.js \ No newline at end of file diff --git a/dist/react-draggable.min.js.map b/dist/react-draggable.min.js.map index 99e8730e..1ea2bca0 100644 --- a/dist/react-draggable.min.js.map +++ b/dist/react-draggable.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 369dfb5970cb0ccd6a54","../index.js","../lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}","../~/classnames/index.js","../~/object-assign/index.js","../lib/utils/domFns.es6","../lib/utils/shims.es6","../lib/utils/getPrefix.es6","../lib/utils/positionFns.es6","../lib/DraggableCore.es6","../lib/utils/log.es6"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","__WEBPACK_EXTERNAL_MODULE_3__","__webpack_require__","moduleId","installedModules","id","loaded","modules","call","m","c","p","DraggableCore","Draggable","_DraggableCore","prototype","apply","arguments","state","dragging","clientX","props","start","x","clientY","y","slackX","slackY","isElementSVG","onDragStart","e","coreEvent","_utilsLog2","position","shouldStart","_this","onStart","_utilsDomFns","createUIEvent","setState","onDrag","uiEvent","newState","left","top","bounds","_utilsPositionFns","getBoundPosition","_getBoundPosition2","shouldUpdate","onDragStop","shouldStop","onStop","_reactDom2","findDOMNode","SVGElement","style","undefined","svgTransform","createTransform","canDragX","canDragY","isNaN","zIndex","className","_classnames2","children","react-draggable-dragging","react-draggable-dragged","dragged","_react2","createElement","cloneElement","Children","only","_objectAssign2","transform","_DraggableCore3","propTypes","axis","_react","PropTypes","oneOf","oneOfType","shape","Number","right","bottom","string","number","_utilsShims","dontSetMe","defaultProps","NaN","__WEBPACK_AMD_DEFINE_RESULT__","classNames","classes","i","length","arg","argType","Array","isArray","key","hasOwn","substr","hasOwnProperty","toObject","val","TypeError","Object","propIsEnumerable","propertyIsEnumerable","assign","target","source","from","symbols","to","s","getOwnPropertySymbols","matchesSelector","el","selector","Node","constructor","name","matchesSelectorFunc","_shims","findInArray","method","isFunction","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","outerHeight","node","height","clientHeight","computedStyle","window","getComputedStyle","borderTopWidth","borderBottomWidth","outerWidth","width","clientWidth","borderLeftWidth","borderRightWidth","innerHeight","paddingTop","paddingBottom","innerWidth","paddingLeft","paddingRight","isSVG","createSVGTransform","createCSSTransform","_ref","out","_getPrefix2","_ref2","addUserSelectStyles","document","body","getAttribute","setAttribute","userSelectStyle","removeUserSelectStyles","replace","styleHacks","childStyle","touchHacks","touchAction","createCoreEvent","draggable","_pendingState","isStart","isNum","lastX","deltaX","deltaY","lastY","toLowerCase","array","callback","_length","func","toString","num","int","a","parseInt","propName","componentName","Error","styles","documentElement","pre","slice","join","match","OLink","toUpperCase","cloneBounds","boundNode","parentNode","querySelector","nodeStyle","boundNodeStyle","offsetLeft","marginLeft","offsetTop","marginTop","_domFns","Math","min","max","snapToGrid","grid","pendingX","pendingY","round","getControlPosition","targetTouches","eventsFor","touch","move","stop","mouse","dragEventFor","_React$Component","handleDragStart","onMouseDown","allowAnyClick","button","disabled","handle","cancel","touchIdentifier","identifier","enableUserSelectHack","_getControlPosition","scrollX","scrollLeft","scrollY","scrollTop","handleScroll","handleDrag","handleDragStop","_getControlPosition2","_snapToGrid2","changedTouches","_getControlPosition3","preventDefault","onTouchStart","onMouseUp","onTouchEnd","bool","arrayOf","Component","log"],"mappings":"AAAA,CAAA,SAAAA,KAAAC,SACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,QAAAG,QAAA,SAAAA,QAAA,cACA,kBAAAC,SAAAA,OAAAC,IACAD,QAAA,QAAA,aAAAJ,SACA,gBAAAC,SACAA,QAAA,eAAAD,QAAAG,QAAA,SAAAA,QAAA,cAEAJ,KAAA,eAAAC,QAAAD,KAAA,MAAAA,KAAA,WACCO,KAAA,SAAAC,8BAAAC,+BACD,yBCNA,QAAAC,qBAAAC,UAGA,GAAAC,iBAAAD,UACA,MAAAC,kBAAAD,UAAAT,OAGA,IAAAC,QAAAS,iBAAAD,WACAT,WACAW,GAAAF,SACAG,QAAA,EAUA,OANAC,SAAAJ,UAAAK,KAAAb,OAAAD,QAAAC,OAAAA,OAAAD,QAAAQ,qBAGAP,OAAAW,QAAA,EAGAX,OAAAD,QAvBA,GAAAU,oBAqCA,OATAF,qBAAAO,EAAAF,QAGA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AAW,EAAE,iBAAU,IAAI;;;;;AAK3B,gBAAS,uBAAW;AACpB,YAAK,uBAAW;AAChB,gBAAS,uBAAW;MACrB;;;;YAEqB;AACpB,oBAAa,EAAE,KAAK;AACpB,aAAM,EAAE,IAAI;AACZ,eAAQ,EAAE,KAAK;AACf,2BAAoB,EAAE,IAAI;AAC1B,aAAM,EAAE,IAAI;AACZ,WAAI,EAAE,IAAI;AACV,gBAAS,EAAE,IAAI;AACf,cAAO,EAAE,mBAAU,EAAE;AACrB,aAAM,EAAE,kBAAU,EAAE;AACpB,aAAM,EAAE,kBAAU,EAAE;AACpB,kBAAW,EAAE,uBAAU,EAAE;MAC1B;;;;UA/LkB,aAAa;IAAS,mBAAM,SAAS;;sBAArC,aAAa;;;;;;;;;;;;;;;;;;;sBC/BV,GAAG;;AAAZ,UAAS,GAAG,GAAG;AAC5B,OAAI,WAA2B,EAAE,OAAO,CAAC,GAAG,OAAX,OAAO,EAAQ,SAAS,CAAC,CAAC;EAC5D","file":"./dist/react-draggable.js","sourceRoot":"","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 369dfb5970cb0ccd6a54\n **/","module.exports = require('./lib/Draggable');\nmodule.exports.DraggableCore = require('./lib/DraggableCore');\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","import {default as React, PropTypes} from 'react';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport assign from 'object-assign';\nimport {createUIEvent, createTransform} from './utils/domFns';\nimport {canDragX, canDragY, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport log from './utils/log';\n\n//\n// Define \n//\n\nexport default class Draggable extends DraggableCore {\n\n static displayName = 'Draggable';\n\n static propTypes = assign({}, DraggableCore.propTypes, {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.Number,\n right: PropTypes.Number,\n top: PropTypes.Number,\n bottom: PropTypes.Number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n /**\n * `start` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n start: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `zIndex` specifies the zIndex to use while dragging.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I have a zIndex
\n *
\n * );\n * }\n * });\n * ```\n */\n zIndex: PropTypes.number,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n });\n\n static defaultProps = assign({}, DraggableCore.defaultProps, {\n axis: 'both',\n bounds: false,\n start: {x: 0, y: 0},\n zIndex: NaN\n });\n\n state = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Current transform x and y.\n clientX: this.props.start.x, clientY: this.props.start.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(ReactDOM.findDOMNode(this) instanceof SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart = (e, coreEvent) => {\n log('Draggable: onDragStart: %j', coreEvent.position);\n\n // Short-circuit if user's callback killed it.\n let shouldStart = this.props.onStart(e, createUIEvent(this, coreEvent));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true});\n };\n\n onDrag = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreEvent.position);\n\n let uiEvent = createUIEvent(this, coreEvent);\n\n let newState = {\n clientX: uiEvent.position.left,\n clientY: uiEvent.position.top\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n let {clientX, clientY} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.clientX += this.state.slackX;\n newState.clientY += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n [newState.clientX, newState.clientY] = getBoundPosition(this, newState.clientX, newState.clientY);\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (clientX - newState.clientX);\n newState.slackY = this.state.slackY + (clientY - newState.clientY);\n\n // Update the event we fire.\n uiEvent.position.left = clientX;\n uiEvent.position.top = clientY;\n }\n\n // Short-circuit if user's callback killed it.\n let shouldUpdate = this.props.onDrag(e, uiEvent);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n let shouldStop = this.props.onStop(e, createUIEvent(this, coreEvent));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreEvent.position);\n\n this.setState({\n dragging: false,\n slackX: 0,\n slackY: 0\n });\n };\n\n render() {\n let style, svgTransform = null;\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n style = createTransform({\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n }, this.state.isElementSVG);\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = style;\n style = {};\n }\n\n // zIndex option\n if (this.state.dragging && !isNaN(this.props.zIndex)) {\n style.zIndex = this.props.zIndex;\n }\n\n // Mark with class while dragging\n let className = classNames((this.props.children.props.className || ''), 'react-draggable', {\n 'react-draggable-dragging': this.state.dragging,\n 'react-draggable-dragged': this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(React.Children.only(this.props.children), {\n className: className,\n style: assign({}, this.props.children.props.style, style),\n transform: svgTransform\n })}\n \n );\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/Draggable.es6\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}\n ** module id = 3\n ** module chunks = 0\n **/","/*!\n Copyright (c) 2015 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses += ' ' + arg;\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/classnames/index.js\n ** module id = 4\n ** module chunks = 0\n **/","/* eslint-disable no-unused-vars */\n'use strict';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nmodule.exports = Object.assign || function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (Object.getOwnPropertySymbols) {\n\t\t\tsymbols = Object.getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/object-assign/index.js\n ** module id = 5\n ** module chunks = 0\n **/","import {findInArray, isFunction, isNum, int} from './shims';\nimport browserPrefix from './getPrefix';\nimport assign from 'object-assign';\nimport ReactDOM from 'react-dom';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string) {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n return isFunction(el[method]);\n });\n }\n\n return el[matchesSelectorFunc].call(el, selector);\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function) {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function) {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: Node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n let computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: Node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n let computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: Node) {\n let height = node.clientHeight;\n let computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: Node) {\n let width = node.clientWidth;\n let computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\nexport function createTransform(position: Object, isSVG: ?boolean) {\n if (isSVG) return createSVGTransform(position);\n return createCSSTransform(position);\n}\n\nexport function createCSSTransform({x, y}: {x: number, y: number}) {\n // Replace unitless items with px\n let out = {transform: 'translate(' + x + 'px,' + y + 'px)'};\n // Add single prefixed property as well\n if (browserPrefix) {\n out[browserPrefix + 'Transform'] = out.transform;\n }\n return out;\n}\n\nexport function createSVGTransform({x, y}: {x: number, y: number}) {\n return 'translate(' + x + ',' + y + ')';\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\nlet userSelectStyle = ';user-select: none;';\nif (browserPrefix) {\n userSelectStyle += '-' + browserPrefix.toLowerCase() + '-user-select: none;';\n}\n\nexport function addUserSelectStyles() {\n let style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nexport function removeUserSelectStyles() {\n let style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nexport function styleHacks(childStyle = {}) {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n let touchHacks = {\n touchAction: 'none'\n };\n\n return assign(touchHacks, childStyle);\n}\n\n// Create an event exposed by \nexport function createCoreEvent(draggable, clientX, clientY) {\n // State changes are often (but not always!) async. We want the latest value.\n let state = draggable._pendingState || draggable.state;\n let isStart = !isNum(state.lastX);\n\n return {\n node: ReactDOM.findDOMNode(draggable),\n position: isStart ?\n // If this is our first move, use the clientX and clientY as last coords.\n {\n deltaX: 0, deltaY: 0,\n lastX: clientX, lastY: clientY,\n clientX: clientX, clientY: clientY\n } :\n // Otherwise calculate proper values.\n {\n deltaX: clientX - state.lastX, deltaY: clientY - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n clientX: clientX, clientY: clientY\n }\n };\n}\n\n// Create an event exposed by \nexport function createUIEvent(draggable, coreEvent) {\n return {\n node: ReactDOM.findDOMNode(draggable),\n position: {\n left: draggable.state.clientX + coreEvent.position.deltaX,\n top: draggable.state.clientY + coreEvent.position.deltaY\n },\n deltaX: coreEvent.position.deltaX,\n deltaY: coreEvent.position.deltaY\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/domFns.es6\n **/","// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array, callback) {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func) {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num) {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a) {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props, propName, componentName) {\n if (props[propName]) {\n throw new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/shims.es6\n **/","export default (function() {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n // Thanks David Walsh\n let styles = window.getComputedStyle(document.documentElement, ''),\n pre = (Array.prototype.slice\n .call(styles)\n .join('')\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])\n )[1];\n // 'ms' is not titlecased\n if(pre === undefined || pre === null) return '';\n if (pre === 'ms') return pre;\n if (pre === undefined || pre === null) return '';\n return pre.slice(0, 1).toUpperCase() + pre.slice(1);\n})();\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/getPrefix.es6\n **/","import {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {innerWidth, innerHeight, outerWidth, outerHeight} from './domFns';\n\nexport function getBoundPosition(draggable, clientX, clientY) {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [clientX, clientY];\n\n // Clone new bounds\n let bounds = cloneBounds(draggable.props.bounds);\n let node = ReactDOM.findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = document.querySelector(bounds);\n if (!boundNode) throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n let nodeStyle = window.getComputedStyle(node);\n let boundNodeStyle = window.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) clientX = Math.min(clientX, bounds.right);\n if (isNum(bounds.bottom)) clientY = Math.min(clientY, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) clientX = Math.max(clientX, bounds.left);\n if (isNum(bounds.top)) clientY = Math.max(clientY, bounds.top);\n\n return [clientX, clientY];\n}\n\nexport function snapToGrid(grid, pendingX, pendingY) {\n let x = Math.round(pendingX / grid[0]) * grid[0];\n let y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {clientX, clientY} positions from event.\nexport function getControlPosition(e) {\n let position = (e.targetTouches && e.targetTouches[0]) || e;\n return {\n clientX: position.clientX,\n clientY: position.clientY\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds) {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/positionFns.es6\n **/","import {default as React, PropTypes} from 'react';\nimport {matchesSelector, createCoreEvent, addEvent, removeEvent, addUserSelectStyles,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\n// Simple abstraction for dragging events names.\nlet eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I can't be dragged
\n *
\n * );\n * }\n * });\n * ```\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I snap to a 25 x 25 grid
\n *
\n * );\n * }\n * });\n * ```\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (due to that there's internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: null, lastY: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n removeEvent(document, eventsFor.mouse.move, this.handleDrag);\n removeEvent(document, eventsFor.touch.move, this.handleDrag);\n removeEvent(document, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(document, eventsFor.touch.stop, this.handleDragStop);\n removeEvent(document, 'scroll', this.handleScroll);\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n }\n\n handleDragStart = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n (this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n if (e.targetTouches){\n this.setState({touchIdentifier: e.targetTouches[0].identifier});\n }\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles();\n\n // Get the current drag point from the event. This is used as the offset.\n let {clientX, clientY} = getControlPosition(e);\n\n // Create an event object with all the data parents need to make a decision here.\n let coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDragStart: %j', coreEvent.position);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n let shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: clientX,\n lastY: clientY,\n // Stored so we can adjust our offset if scrolled.\n scrollX: document.body.scrollLeft,\n scrollY: document.body.scrollTop\n });\n\n // Translate el on page scroll.\n addEvent(document, 'scroll', this.handleScroll);\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag = (e) => {\n // Return if this is a touch event, but not the correct one for this element\n if (e.targetTouches && (e.targetTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n let {clientX, clientY} = getControlPosition(e);\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = clientX - this.state.lastX, deltaY = clientY - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n clientX = this.state.lastX + deltaX, clientY = this.state.lastY + deltaY;\n }\n\n let coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDrag: %j', coreEvent.position);\n\n\n // Call event handler. If it returns explicit false, trigger end.\n let shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n this.handleDragStop({});\n return;\n }\n\n this.setState({\n lastX: clientX,\n lastY: clientY\n });\n };\n\n handleDragStop = (e) => {\n if (!this.state.dragging) return;\n\n // Short circuit if this is not the correct touch event. `changedTouches` contains all\n // touch points that have been removed from the surface.\n if (e.changedTouches && (e.changedTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n\n let {clientX, clientY} = getControlPosition(e);\n let coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDragStop: %j', coreEvent.position);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: null,\n lastY: null\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(document, 'scroll', this.handleScroll);\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n // When the user scrolls, adjust internal state so the draggable moves along the page properly.\n // This only fires when a drag is active.\n handleScroll = (e) => {\n let s = this.state, x = document.body.scrollLeft, y = document.body.scrollTop;\n\n // Create the usual event, but make the scroll offset our deltas.\n let coreEvent = createCoreEvent(this);\n coreEvent.position.deltaX = x - s.scrollX;\n coreEvent.position.deltaY = y - s.scrollY;\n\n this.setState({\n lastX: s.lastX + coreEvent.position.deltaX,\n lastY: s.lastY + coreEvent.position.deltaY\n });\n\n this.props.onDrag(e, coreEvent);\n };\n\n // On mousedown, consider the drag started.\n onMouseDown = (e) => {\n // HACK: Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.\n // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.\n // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/\n if (dragEventFor === eventsFor.touch) {\n return e.preventDefault();\n }\n\n return this.handleDragStart(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.handleDragStop,\n onTouchEnd: this.handleDragStop\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/DraggableCore.es6\n **/","export default function log() {\n if (process.env.DRAGGABLE_DEBUG) console.log(...arguments);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/log.es6\n **/"]} \ No newline at end of file +{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap e87cfc73994e4a79eb79","../index.js","../lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}","../~/classnames/index.js","../lib/utils/domFns.es6","../lib/utils/shims.es6","../lib/utils/getPrefix.es6","../lib/utils/positionFns.es6","../lib/DraggableCore.es6","../lib/utils/log.es6"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","__WEBPACK_EXTERNAL_MODULE_3__","__webpack_require__","moduleId","installedModules","id","loaded","modules","call","m","c","p","DraggableCore","Draggable","_React$Component","state","dragging","dragged","clientX","_this","props","start","x","clientY","y","slackX","slackY","isElementSVG","onDragStart","e","coreEvent","_log2","position","shouldStart","onStart","_domFns","createUIEvent","setState","onDrag","uiEvent","newState","left","top","bounds","_clientX","_clientY","_positionFns","getBoundPosition","_getBoundPosition2","deltaX","deltaY","shouldUpdate","onDragStop","shouldStop","onStop","_temp","_possibleConstructorReturn","_ret","_reactDom2","findDOMNode","SVGElement","style","svgTransform","transformOpts","canDragX","canDragY","createSVGTransform","createCSSTransform","isNaN","zIndex","className","_classnames2","children","react-draggable-dragging","react-draggable-dragged","_react2","createElement","cloneElement","Children","only","_extends","transform","Component","displayName","propTypes","_DraggableCore2","axis","_react","PropTypes","oneOf","oneOfType","shape","Number","right","bottom","string","number","_shims","dontSetMe","defaultProps","NaN","__WEBPACK_AMD_DEFINE_RESULT__","classNames","classes","i","arguments","length","arg","argType","Array","isArray","apply","key","hasOwn","substr","hasOwnProperty","undefined","matchesSelector","el","selector","matchesSelectorFunc","findInArray","method","isFunction","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","outerHeight","node","height","clientHeight","computedStyle","window","getComputedStyle","borderTopWidth","borderBottomWidth","outerWidth","width","clientWidth","borderLeftWidth","borderRightWidth","innerHeight","paddingTop","paddingBottom","innerWidth","paddingLeft","paddingRight","_ref","out","_getPrefix2","_ref2","addUserSelectStyles","document","body","getAttribute","setAttribute","userSelectStyle","removeUserSelectStyles","replace","styleHacks","childStyle","touchAction","createCoreEvent","draggable","_pendingState","isStart","isNum","lastX","lastY","toLowerCase","array","callback","func","Object","prototype","toString","num","int","a","parseInt","propName","componentName","Error","generatePrefix","styles","documentElement","pre","slice","join","match","OLink","toUpperCase","cloneBounds","boundNode","parentNode","querySelector","nodeStyle","boundNodeStyle","offsetLeft","marginLeft","offsetTop","marginTop","Math","min","max","snapToGrid","grid","pendingX","pendingY","round","getControlPosition","targetTouches","eventsFor","touch","move","stop","mouse","dragEventFor","handleDragStart","onMouseDown","allowAnyClick","button","disabled","handle","target","cancel","touchIdentifier","identifier","enableUserSelectHack","_getControlPosition","scrollX","scrollLeft","scrollY","scrollTop","handleScroll","handleDrag","handleDragStop","_getControlPosition2","_snapToGrid2","changedTouches","_getControlPosition3","s","preventDefault","onTouchStart","onMouseUp","onTouchEnd","bool","arrayOf","log"],"mappings":"AAAA,CAAA,SAAAA,KAAAC,SACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,QAAAG,QAAA,SAAAA,QAAA,cACA,kBAAAC,SAAAA,OAAAC,IACAD,QAAA,QAAA,aAAAJ,SACA,gBAAAC,SACAA,QAAA,eAAAD,QAAAG,QAAA,SAAAA,QAAA,cAEAJ,KAAA,eAAAC,QAAAD,KAAA,MAAAA,KAAA,WACCO,KAAA,SAAAC,8BAAAC,+BACD,yBCNA,QAAAC,qBAAAC,UAGA,GAAAC,iBAAAD,UACA,MAAAC,kBAAAD,UAAAT,OAGA,IAAAC,QAAAS,iBAAAD,WACAT,WACAW,GAAAF,SACAG,QAAA,EAUA,OANAC,SAAAJ,UAAAK,KAAAb,OAAAD,QAAAC,OAAAA,OAAAD,QAAAQ,qBAGAP,OAAAW,QAAA,EAGAX,OAAAD,QAvBA,GAAAU,oBAqCA,OATAF,qBAAAO,EAAAF,QAGAL,oBAAAQ,EAAAN,iBAGAF,oBAAAS,EAAA,GAGAT,oBAAA,8DCtCAP,QAAOD,QAAUQ,oBAAQ,GAARA,W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AAK,YAAL;AACd,oBAAW,KAAK,cAAL;AACX,qBAAY,KAAK,cAAL;QARP,CAAP,CAHqB;;;;UArXJ;GAAsB,gBAAM,SAAN;;AAAtB,eAEZ,cAAc;AAFF,eAIZ,YAAY;;;;;;;AAOjB,kBAAe,iBAAU,IAAV;;;;;;;;;;;;;;;;;;;;AAoBf,aAAU,iBAAU,IAAV;;;;;;;AAOV,yBAAsB,iBAAU,IAAV;;;;;;;;;;;;;;;;;;;AAmBtB,SAAM,iBAAU,OAAV,CAAkB,iBAAU,MAAV,CAAxB;;;;;;;;;;;;;;;;;;;;;;AAsBA,WAAQ,iBAAU,MAAV;;;;;;;;;;;;;;;;;;;;;;AAsBR,WAAQ,iBAAU,MAAV;;;;;;;;;;;;;;;;;;;;;AAqBR,YAAS,iBAAU,IAAV;;;;;;;;;;;;;;;;;;;;;AAqBT,WAAQ,iBAAU,IAAV;;;;;;;;;;;;;;;;;;;;AAoBR,WAAQ,iBAAU,IAAV;;;;;;AAMR,gBAAa,iBAAU,IAAV;;;;;AAKb,8BA1KiB;AA2KjB,0BA3KiB;AA4KjB,8BA5KiB;;AAJA,eAmLZ,eAAe;AACpB,kBAAe,KAAf;AACA,WAAQ,IAAR;AACA,aAAU,KAAV;AACA,yBAAsB,IAAtB;AACA,WAAQ,IAAR;AACA,SAAM,IAAN;AACA,cAAW,IAAX;AACA,YAAS,mBAAU,EAAV;AACT,WAAQ,kBAAU,EAAV;AACR,WAAQ,kBAAU,EAAV;AACR,gBAAa,uBAAU,EAAV;;mBA9LI,c;;;;;;;;;;;mBCtCG;AAAT,UAAS,GAAT,GAA2B;;;AACxC,OAAI,aAA6B,qBAAQ,GAAR,4BAAjC","file":"./dist/react-draggable.js","sourceRoot":"","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap e87cfc73994e4a79eb79\n **/","module.exports = require('./lib/Draggable').default;\nmodule.exports.DraggableCore = require('./lib/DraggableCore').default;\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","// @flow\nimport {default as React, PropTypes} from 'react';\nimport ReactDOM from 'react-dom';\n// $FlowIgnore\nimport classNames from 'classnames';\nimport {createUIEvent, createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport log from './utils/log';\n\nimport type {CoreEvent} from './utils/domFns';\nexport type CoreEventHandler = (e: Event, coreEvent: CoreEvent) => void | false;\nexport type DraggableState = {\n dragging: boolean,\n dragged: boolean,\n clientX: number, clientY: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\n//\n// Define \n//\n\nexport default class Draggable extends React.Component {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.Number,\n right: PropTypes.Number,\n top: PropTypes.Number,\n bottom: PropTypes.Number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n /**\n * `start` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n start: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `zIndex` specifies the zIndex to use while dragging.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I have a zIndex
\n *
\n * );\n * }\n * });\n * ```\n */\n zIndex: PropTypes.number,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n start: {x: 0, y: 0},\n zIndex: NaN\n };\n\n state: DraggableState = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n clientX: this.props.start.x, clientY: this.props.start.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(ReactDOM.findDOMNode(this) instanceof SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: CoreEventHandler = (e, coreEvent) => {\n log('Draggable: onDragStart: %j', coreEvent.position);\n\n // Short-circuit if user's callback killed it.\n let shouldStart = this.props.onStart(e, createUIEvent(this, coreEvent));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: CoreEventHandler = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreEvent.position);\n\n let uiEvent = createUIEvent(this, coreEvent);\n\n let newState = {\n clientX: uiEvent.position.left,\n clientY: uiEvent.position.top\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n let {clientX, clientY} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.clientX += this.state.slackX;\n newState.clientY += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n [newState.clientX, newState.clientY] = getBoundPosition(this, newState.clientX, newState.clientY);\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (clientX - newState.clientX);\n newState.slackY = this.state.slackY + (clientY - newState.clientY);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiEvent.position.left = clientX;\n uiEvent.position.top = clientY;\n uiEvent.deltaX = newState.clientX - this.state.clientX;\n uiEvent.deltaY = newState.clientY - this.state.clientY;\n }\n\n // Short-circuit if user's callback killed it.\n let shouldUpdate = this.props.onDrag(e, uiEvent);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: CoreEventHandler = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n let shouldStop = this.props.onStop(e, createUIEvent(this, coreEvent));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreEvent.position);\n\n this.setState({\n dragging: false,\n slackX: 0,\n slackY: 0\n });\n };\n\n render(): ReactElement {\n let style = {}, svgTransform = null;\n\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts);\n } else {\n style = createCSSTransform(transformOpts);\n }\n\n // zIndex option\n if (this.state.dragging && !isNaN(this.props.zIndex)) {\n style.zIndex = this.props.zIndex;\n }\n\n // Mark with class while dragging\n let className = classNames((this.props.children.props.className || ''), 'react-draggable', {\n 'react-draggable-dragging': this.state.dragging,\n 'react-draggable-dragged': this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(React.Children.only(this.props.children), {\n className: className,\n style: {...this.props.children.props.style, ...style},\n transform: svgTransform\n })}\n \n );\n }\n}\n\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/Draggable.es6\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}\n ** module id = 3\n ** module chunks = 0\n **/","/*!\n Copyright (c) 2015 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses += ' ' + arg;\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/classnames/index.js\n ** module id = 4\n ** module chunks = 0\n **/","// @flow\nimport {findInArray, isFunction, isNum, int} from './shims';\nimport browserPrefix from './getPrefix';\nimport ReactDOM from 'react-dom';\n\nimport type Draggable from '../Draggable';\nimport type DraggableCore from '../DraggableCore';\n\nexport type CoreEvent = {\n node: HTMLElement,\n position: {\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n clientX: number, clientY: number\n }\n};\n\nexport type UIEvent = {\n node: HTMLElement,\n position: {\n left: number, top: number\n },\n deltaX: number, deltaY: number\n};\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: HTMLElement, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc].call(el, selector);\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n let computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n let computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n let computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n let computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\nexport function createCSSTransform({x, y}: {x: number, y: number}): Object {\n // Replace unitless items with px\n let out = {transform: 'translate(' + x + 'px,' + y + 'px)'};\n // Add single prefixed property as well\n if (browserPrefix) {\n out[browserPrefix + 'Transform'] = out.transform;\n }\n return out;\n}\n\nexport function createSVGTransform({x, y}: {x: number, y: number}): string {\n return 'translate(' + x + ',' + y + ')';\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\nlet userSelectStyle = ';user-select: none;';\nif (browserPrefix) {\n userSelectStyle += '-' + browserPrefix.toLowerCase() + '-user-select: none;';\n}\n\nexport function addUserSelectStyles() {\n let style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nexport function removeUserSelectStyles() {\n let style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\n// Create an event exposed by \nexport function createCoreEvent(draggable: DraggableCore, clientX: number, clientY: number): CoreEvent {\n // State changes are often (but not always!) async. We want the latest value.\n let state = draggable._pendingState || draggable.state;\n let isStart = !isNum(state.lastX);\n\n return {\n node: ReactDOM.findDOMNode(draggable),\n position: isStart ?\n // If this is our first move, use the clientX and clientY as last coords.\n {\n deltaX: 0, deltaY: 0,\n lastX: clientX, lastY: clientY,\n clientX: clientX, clientY: clientY\n } :\n // Otherwise calculate proper values.\n {\n deltaX: clientX - state.lastX, deltaY: clientY - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n clientX: clientX, clientY: clientY\n }\n };\n}\n\n// Create an event exposed by \nexport function createUIEvent(draggable: Draggable, coreEvent: CoreEvent): UIEvent {\n return {\n node: ReactDOM.findDOMNode(draggable),\n position: {\n left: draggable.state.clientX + coreEvent.position.deltaX,\n top: draggable.state.clientY + coreEvent.position.deltaY\n },\n deltaX: coreEvent.position.deltaX,\n deltaY: coreEvent.position.deltaY\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/domFns.es6\n **/","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n throw new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/shims.es6\n **/","// @flow\nexport function generatePrefix(): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n // Thanks David Walsh\n let styles = window.getComputedStyle(document.documentElement, ''),\n pre = (Array.prototype.slice\n .call(styles)\n .join('')\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' ? ['', 'o'] : [])\n )[1];\n // 'ms' is not titlecased\n if (pre === undefined || pre === null) return '';\n if (pre === 'ms') return pre;\n if (pre === undefined || pre === null) return '';\n return pre.slice(0, 1).toUpperCase() + pre.slice(1);\n}\n\nexport default generatePrefix();\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/getPrefix.es6\n **/","// @flow\nimport React from 'react';\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {innerWidth, innerHeight, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nexport type ControlPosition = {\n clientX: number, clientY: number\n};\nexport type Bounds = {\n left: number, top: number, right: number, bottom: number\n};\n\nexport function getBoundPosition(draggable: Draggable, clientX: number, clientY: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [clientX, clientY];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n let node = ReactDOM.findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = document.querySelector(bounds);\n if (!boundNode) throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n let nodeStyle = window.getComputedStyle(node);\n let boundNodeStyle = window.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) clientX = Math.min(clientX, bounds.right);\n if (isNum(bounds.bottom)) clientY = Math.min(clientY, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) clientX = Math.max(clientX, bounds.left);\n if (isNum(bounds.top)) clientY = Math.max(clientY, bounds.top);\n\n return [clientX, clientY];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n let x = Math.round(pendingX / grid[0]) * grid[0];\n let y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: React.Component): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: React.Component): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {clientX, clientY} positions from event.\nexport function getControlPosition(e: Event): ControlPosition {\n let position = (e.targetTouches && e.targetTouches[0]) || e;\n return {\n clientX: position.clientX,\n clientY: position.clientY\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/positionFns.es6\n **/","// @flow\nimport {default as React, PropTypes} from 'react';\nimport {matchesSelector, createCoreEvent, addEvent, removeEvent, addUserSelectStyles,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype EventHandler = (e: Event) => void;\ntype CoreState = {\n dragging: boolean,\n lastX: ?number,\n lastY: ?number\n};\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I can't be dragged
\n *
\n * );\n * }\n * });\n * ```\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
I snap to a 25 x 25 grid
\n *
\n * );\n * }\n * });\n * ```\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
\n *
Click me to drag
\n *
This is some other content
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * \n *
\n *
You can't drag from here
\n *
Dragging here works fine
\n *
\n *
\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (due to that there's internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state: CoreState = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: null, lastY: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n removeEvent(document, eventsFor.mouse.move, this.handleDrag);\n removeEvent(document, eventsFor.touch.move, this.handleDrag);\n removeEvent(document, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(document, eventsFor.touch.stop, this.handleDragStop);\n removeEvent(document, 'scroll', this.handleScroll);\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n }\n\n handleDragStart: EventHandler = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n (this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n if (e.targetTouches){\n this.setState({touchIdentifier: e.targetTouches[0].identifier});\n }\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles();\n\n // Get the current drag point from the event. This is used as the offset.\n let {clientX, clientY} = getControlPosition(e);\n\n // Create an event object with all the data parents need to make a decision here.\n let coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDragStart: %j', coreEvent.position);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n let shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: clientX,\n lastY: clientY,\n // Stored so we can adjust our offset if scrolled.\n scrollX: document.body.scrollLeft,\n scrollY: document.body.scrollTop\n });\n\n // Translate el on page scroll.\n addEvent(document, 'scroll', this.handleScroll);\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler = (e) => {\n // Return if this is a touch event, but not the correct one for this element\n if (e.targetTouches && (e.targetTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n let {clientX, clientY} = getControlPosition(e);\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = clientX - this.state.lastX, deltaY = clientY - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n clientX = this.state.lastX + deltaX, clientY = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDrag: %j', coreEvent.position);\n\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n this.handleDragStop({});\n return;\n }\n\n this.setState({\n lastX: clientX,\n lastY: clientY\n });\n };\n\n handleDragStop: EventHandler = (e) => {\n if (!this.state.dragging) return;\n\n // Short circuit if this is not the correct touch event. `changedTouches` contains all\n // touch points that have been removed from the surface.\n if (e.changedTouches && (e.changedTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n\n let {clientX, clientY} = getControlPosition(e);\n const coreEvent = createCoreEvent(this, clientX, clientY);\n\n log('DraggableCore: handleDragStop: %j', coreEvent.position);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: null,\n lastY: null\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(document, 'scroll', this.handleScroll);\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n // When the user scrolls, adjust internal state so the draggable moves along the page properly.\n // This only fires when a drag is active.\n handleScroll: EventHandler = (e) => {\n const s = this.state, x = document.body.scrollLeft, y = document.body.scrollTop;\n\n // Create the usual event, but make the scroll offset our deltas.\n let coreEvent = createCoreEvent(this);\n coreEvent.position.deltaX = x - s.scrollX;\n coreEvent.position.deltaY = y - s.scrollY;\n\n this.setState({\n lastX: s.lastX + coreEvent.position.deltaX,\n lastY: s.lastY + coreEvent.position.deltaY\n });\n\n this.props.onDrag(e, coreEvent);\n };\n\n // On mousedown, consider the drag started.\n onMouseDown: EventHandler = (e) => {\n // HACK: Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.\n // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.\n // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/\n if (dragEventFor === eventsFor.touch) {\n return e.preventDefault();\n }\n\n return this.handleDragStart(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n render(): ReactElement {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.handleDragStop,\n onTouchEnd: this.handleDragStop\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/DraggableCore.es6\n **/","// @flow\nexport default function log(...args: any) {\n if (process.env.DRAGGABLE_DEBUG) console.log(...args);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/log.es6\n **/"]} \ No newline at end of file diff --git a/package.json b/package.json index 28f700ce..6a3f7238 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "1.3.0", + "version": "1.3.1", "description": "React draggable component", "main": "dist/react-draggable.js", "browser": "dist/react-draggable.js", @@ -64,4 +64,4 @@ "classnames": "^2.2.0", "object-assign": "^4.0.1" } -} +} \ No newline at end of file