diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af1e575..96962f6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +### 1.1.2 (Nov 23, 2015) + +- Bugfix: `` was calling back with clientX/Y, not offsetX/Y as it did pre-1.0. This unintended + behavior has been fixed and a test has been added. + ### 1.1.1 (Nov 14, 2015) - Bugfix: Clean up scroll events if a component is unmounted before drag stops. diff --git a/bower.json b/bower.json index 4b34d538..efc8ead5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "1.1.1", + "version": "1.1.2", "homepage": "https://github.com/mzabriskie/react-draggable", "authors": [ "Matt Zabriskie" diff --git a/dist/react-draggable.js b/dist/react-draggable.js index 0b405bf3..363389b0 100644 --- a/dist/react-draggable.js +++ b/dist/react-draggable.js @@ -146,22 +146,22 @@ return /******/ (function(modules) { // webpackBootstrap // Kills start event on core as well, so move handlers are never bound. if (shouldStart === false) return false; - _this.setState({ - dragging: true - }); + _this.setState({ dragging: true }); }; this.onDrag = function (e, coreEvent) { if (!_this.state.dragging) return false; (0, _utilsLog2['default'])('Draggable: onDrag: %j', coreEvent.position); + var uiEvent = (0, _utilsDomFns.createUIEvent)(_this, coreEvent); + // Short-circuit if user's callback killed it. - var shouldUpdate = _this.props.onDrag(e, (0, _utilsDomFns.createUIEvent)(_this, coreEvent)); + var shouldUpdate = _this.props.onDrag(e, uiEvent); if (shouldUpdate === false) return false; var newState = { - clientX: _this.state.clientX + coreEvent.position.deltaX, - clientY: _this.state.clientY + coreEvent.position.deltaY + clientX: uiEvent.position.left, + clientY: uiEvent.position.top }; // Keep within bounds. @@ -518,6 +518,9 @@ return /******/ (function(modules) { // webpackBootstrap 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) { return (0, _shims.isFunction)(el[method]); @@ -528,6 +531,10 @@ return /******/ (function(modules) { // webpackBootstrap } 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; } @@ -541,6 +548,10 @@ return /******/ (function(modules) { // webpackBootstrap } 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; } @@ -554,6 +565,8 @@ return /******/ (function(modules) { // webpackBootstrap } 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; @@ -564,6 +577,8 @@ 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; @@ -574,6 +589,8 @@ return /******/ (function(modules) { // webpackBootstrap } 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); @@ -582,6 +599,8 @@ 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); @@ -590,6 +609,9 @@ return /******/ (function(modules) { // webpackBootstrap } 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); } @@ -598,6 +620,8 @@ return /******/ (function(modules) { // webpackBootstrap 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 @@ -612,6 +636,8 @@ return /******/ (function(modules) { // webpackBootstrap 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 + ')'; })(); } @@ -677,8 +703,8 @@ return /******/ (function(modules) { // webpackBootstrap return { node: _reactDom2['default'].findDOMNode(draggable), position: { - top: coreEvent.position.clientY, - left: coreEvent.position.clientX + left: draggable.state.clientX + coreEvent.position.deltaX, + top: draggable.state.clientY + coreEvent.position.deltaY }, deltaX: coreEvent.position.deltaX, deltaY: coreEvent.position.deltaY diff --git a/dist/react-draggable.js.map b/dist/react-draggable.js.map index eb75844f..a15980b3 100644 --- a/dist/react-draggable.js.map +++ b/dist/react-draggable.js.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 2317c1e77329dd28df60",".././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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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 2317c1e77329dd28df60\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 * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y']),\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.oneOf(['parent', 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 // 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 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({\n dragging: true\n });\n };\n\n onDrag = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreEvent.position);\n\n // Short-circuit if user's callback killed it.\n let shouldUpdate = this.props.onDrag(e, createUIEvent(this, coreEvent));\n if (shouldUpdate === false) return false;\n\n let newState = {\n clientX: this.state.clientX + coreEvent.position.deltaX,\n clientY: this.state.clientY + coreEvent.position.deltaY\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n [newState.clientX, newState.clientY] = getBoundPosition(this, newState.clientX, newState.clientY);\n }\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 });\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 top: coreEvent.position.clientY,\n left: coreEvent.position.clientX\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 if (typeof window === 'undefined') return '';\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 let bounds = JSON.parse(JSON.stringify(draggable.props.bounds));\n let node = ReactDOM.findDOMNode(draggable);\n let parent = node.parentNode;\n\n if (bounds === 'parent') {\n let nodeStyle = window.getComputedStyle(node);\n let parentStyle = window.getComputedStyle(parent);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(parentStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(parentStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(parent) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(parent) - 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\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 e0dcb4b52a4f8935e74d",".././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;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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 e0dcb4b52a4f8935e74d\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 * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y']),\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.oneOf(['parent', 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 // 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 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 // Short-circuit if user's callback killed it.\n let shouldUpdate = this.props.onDrag(e, uiEvent);\n if (shouldUpdate === false) return false;\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 [newState.clientX, newState.clientY] = getBoundPosition(this, newState.clientX, newState.clientY);\n }\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 });\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 if (typeof window === 'undefined') return '';\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 let bounds = JSON.parse(JSON.stringify(draggable.props.bounds));\n let node = ReactDOM.findDOMNode(draggable);\n let parent = node.parentNode;\n\n if (bounds === 'parent') {\n let nodeStyle = window.getComputedStyle(node);\n let parentStyle = window.getComputedStyle(parent);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(parentStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(parentStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(parent) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(parent) - 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\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 diff --git a/dist/react-draggable.min.js b/dist/react-draggable.min.js index 48c70223..874006fe 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)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=JSON.parse(JSON.stringify(draggable.props.bounds)),node=_reactDom2["default"].findDOMNode(draggable),parent=node.parentNode;if("parent"===bounds){var nodeStyle=window.getComputedStyle(node),parentStyle=window.getComputedStyle(parent);bounds={left:-node.offsetLeft+(0,_shims["int"])(parentStyle.paddingLeft)+(0,_shims["int"])(nodeStyle.borderLeftWidth)+(0,_shims["int"])(nodeStyle.marginLeft),top:-node.offsetTop+(0,_shims["int"])(parentStyle.paddingTop)+(0,_shims["int"])(nodeStyle.borderTopWidth)+(0,_shims["int"])(nodeStyle.marginTop),right:(0,_domFns.innerWidth)(parent)-(0,_domFns.outerWidth)(node)-node.offsetLeft,bottom:(0,_domFns.innerHeight)(parent)-(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}}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;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)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=JSON.parse(JSON.stringify(draggable.props.bounds)),node=_reactDom2["default"].findDOMNode(draggable),parent=node.parentNode;if("parent"===bounds){var nodeStyle=window.getComputedStyle(node),parentStyle=window.getComputedStyle(parent);bounds={left:-node.offsetLeft+(0,_shims["int"])(parentStyle.paddingLeft)+(0,_shims["int"])(nodeStyle.borderLeftWidth)+(0,_shims["int"])(nodeStyle.marginLeft),top:-node.offsetTop+(0,_shims["int"])(parentStyle.paddingTop)+(0,_shims["int"])(nodeStyle.borderTopWidth)+(0,_shims["int"])(nodeStyle.marginTop),right:(0,_domFns.innerWidth)(parent)-(0,_domFns.outerWidth)(node)-node.offsetLeft,bottom:(0,_domFns.innerHeight)(parent)-(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}}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\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 * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y']),\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.oneOf(['parent', 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 // 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 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({\n dragging: true\n });\n };\n\n onDrag = (e, coreEvent) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreEvent.position);\n\n // Short-circuit if user's callback killed it.\n let shouldUpdate = this.props.onDrag(e, createUIEvent(this, coreEvent));\n if (shouldUpdate === false) return false;\n\n let newState = {\n clientX: this.state.clientX + coreEvent.position.deltaX,\n clientY: this.state.clientY + coreEvent.position.deltaY\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n [newState.clientX, newState.clientY] = getBoundPosition(this, newState.clientX, newState.clientY);\n }\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 });\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 top: coreEvent.position.clientY,\n left: coreEvent.position.clientX\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 if (typeof window === 'undefined') return '';\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 let bounds = JSON.parse(JSON.stringify(draggable.props.bounds));\n let node = ReactDOM.findDOMNode(draggable);\n let parent = node.parentNode;\n\n if (bounds === 'parent') {\n let nodeStyle = window.getComputedStyle(node);\n let parentStyle = window.getComputedStyle(parent);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(parentStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(parentStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(parent) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(parent) - 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\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 e0dcb4b52a4f8935e74d","../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","isElementSVG","onDragStart","e","coreEvent","_utilsLog2","position","shouldStart","_this","onStart","_utilsDomFns","createUIEvent","setState","onDrag","uiEvent","shouldUpdate","newState","left","top","bounds","_utilsPositionFns","getBoundPosition","_getBoundPosition2","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","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","JSON","parse","stringify","parent","parentNode","nodeStyle","parentStyle","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","string","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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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 e0dcb4b52a4f8935e74d\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 * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y']),\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.oneOf(['parent', 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 // 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 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 // Short-circuit if user's callback killed it.\n let shouldUpdate = this.props.onDrag(e, uiEvent);\n if (shouldUpdate === false) return false;\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 [newState.clientX, newState.clientY] = getBoundPosition(this, newState.clientX, newState.clientY);\n }\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 });\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 if (typeof window === 'undefined') return '';\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 let bounds = JSON.parse(JSON.stringify(draggable.props.bounds));\n let node = ReactDOM.findDOMNode(draggable);\n let parent = node.parentNode;\n\n if (bounds === 'parent') {\n let nodeStyle = window.getComputedStyle(node);\n let parentStyle = window.getComputedStyle(parent);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(parentStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(parentStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(parent) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(parent) - 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\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 diff --git a/package.json b/package.json index 984d40af..f44f5e8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "1.1.1", + "version": "1.1.2", "description": "React draggable component", "main": "dist/react-draggable.js", "browser": "dist/react-draggable.js",