diff --git a/CHANGELOG.md b/CHANGELOG.md index c7a2c83d..5af1e575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### 1.1.1 (Nov 14, 2015) + +- Bugfix: Clean up scroll events if a component is unmounted before drag stops. +- Bugfix: `NaN` was returning from scroll events due to event structure change. +- Add scroll drag modulation test. + ### 1.1.0 (Nov 14, 2015) - Move `grid` into `` directly. It will continue to work on ``. diff --git a/bower.json b/bower.json index 91161d39..4b34d538 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "1.1.0", + "version": "1.1.1", "homepage": "https://github.com/mzabriskie/react-draggable", "authors": [ "Matt Zabriskie" diff --git a/dist/react-draggable.js b/dist/react-draggable.js index 2f800b2c..0b405bf3 100644 --- a/dist/react-draggable.js +++ b/dist/react-draggable.js @@ -1052,12 +1052,12 @@ return /******/ (function(modules) { // webpackBootstrap // Create the usual event, but make the scroll offset our deltas. var coreEvent = (0, _utilsDomFns.createCoreEvent)(_this); - coreEvent.deltaX = x - s.scrollX; - coreEvent.deltaY = y - s.scrollY; + coreEvent.position.deltaX = x - s.scrollX; + coreEvent.position.deltaY = y - s.scrollY; _this.setState({ - lastX: s.lastX + coreEvent.deltaX, - lastY: s.lastY + coreEvent.deltaY + lastX: s.lastX + coreEvent.position.deltaX, + lastY: s.lastY + coreEvent.position.deltaY }); _this.props.onDrag(e, coreEvent); @@ -1091,6 +1091,7 @@ return /******/ (function(modules) { // webpackBootstrap (0, _utilsDomFns.removeEvent)(document, eventsFor.touch.move, this.handleDrag); (0, _utilsDomFns.removeEvent)(document, eventsFor.mouse.stop, this.handleDragStop); (0, _utilsDomFns.removeEvent)(document, eventsFor.touch.stop, this.handleDragStop); + (0, _utilsDomFns.removeEvent)(document, 'scroll', this.handleScroll); if (this.props.enableUserSelectHack) (0, _utilsDomFns.removeUserSelectStyles)(); } }, { diff --git a/dist/react-draggable.js.map b/dist/react-draggable.js.map index c230cc05..eb75844f 100644 --- a/dist/react-draggable.js.map +++ b/dist/react-draggable.js.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 5301740fd28c14c859c5",".././index.js",".././lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}",".././~/classnames/index.js",".././~/object-assign/index.js",".././lib/utils/domFns.es6",".././lib/utils/shims.es6",".././lib/utils/getPrefix.es6",".././lib/utils/positionFns.es6",".././lib/DraggableCore.es6",".././lib/utils/log.es6"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA,OAAM,CAAC,OAAO,GAAG,mBAAO,CAAC,CAAiB,CAAC,CAAC;AAC5C,OAAM,CAAC,OAAO,CAAC,aAAa,GAAG,mBAAO,CAAC,EAAqB,CAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;kCCDnB,CAAO;;;;qCAC5B,CAAW;;;;uCACT,CAAY;;;;yCAChB,CAAe;;;;wCACW,CAAgB;;6CACV,CAAqB;;uCAChD,CAAe;;2CACb,EAAiB;;;;qCAC3B,EAAa;;;;;;;;KAMR,SAAS;aAAT,SAAS;;YAAT,SAAS;;;2BAAT,SAAS;;gCAAT,SAAS;;UA4G5B,KAAK,GAAG;;AAEN,eAAQ,EAAE,KAAK;;;AAGf,cAAO,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,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AI;AACV,gBAAS,EAAE,IAAI;AACf,cAAO,EAAE,mBAAU,EAAE;AACrB,aAAM,EAAE,kBAAU,EAAE;AACpB,aAAM,EAAE,kBAAU,EAAE;AACpB,kBAAW,EAAE,uBAAU,EAAE;MAC1B;;;;UA/LkB,aAAa;IAAS,mBAAM,SAAS;;sBAArC,aAAa;;;;;;;;;;;;;;;;;;;sBC/BV,GAAG;;AAAZ,UAAS,GAAG,GAAG;AAC5B,OAAI,WAA2B,EAAE,OAAO,CAAC,GAAG,OAAX,OAAO,EAAQ,SAAS,CAAC,CAAC;EAC5D","file":"./dist/react-draggable.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 5301740fd28c14c859c5\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 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.deltaX = x - s.scrollX;\n coreEvent.deltaY = y - s.scrollY;\n\n this.setState({\n lastX: s.lastX + coreEvent.deltaX,\n lastY: s.lastY + coreEvent.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 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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA,OAAM,CAAC,OAAO,GAAG,mBAAO,CAAC,CAAiB,CAAC,CAAC;AAC5C,OAAM,CAAC,OAAO,CAAC,aAAa,GAAG,mBAAO,CAAC,EAAqB,CAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;kCCDnB,CAAO;;;;qCAC5B,CAAW;;;;uCACT,CAAY;;;;yCAChB,CAAe;;;;wCACW,CAAgB;;6CACV,CAAqB;;uCAChD,CAAe;;2CACb,EAAiB;;;;qCAC3B,EAAa;;;;;;;;KAMR,SAAS;aAAT,SAAS;;YAAT,SAAS;;;2BAAT,SAAS;;gCAAT,SAAS;;UA4G5B,KAAK,GAAG;;AAEN,eAAQ,EAAE,KAAK;;;AAGf,cAAO,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;;;AAGxD,mBAAY,EAAE,KAAK;MACpB;;UASD,WAAW,GAAG,UAAC,CAAC,EAAE,SAAS,EAAK;AAC9B,kCAAI,4BAA4B,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;;;AAGtD,WAAI,WAAW,GA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AAE;AACrB,aAAM,EAAE,kBAAU,EAAE;AACpB,aAAM,EAAE,kBAAU,EAAE;AACpB,kBAAW,EAAE,uBAAU,EAAE;MAC1B;;;;UA/LkB,aAAa;IAAS,mBAAM,SAAS;;sBAArC,aAAa;;;;;;;;;;;;;;;;;;;sBC/BV,GAAG;;AAAZ,UAAS,GAAG,GAAG;AAC5B,OAAI,WAA2B,EAAE,OAAO,CAAC,GAAG,OAAX,OAAO,EAAQ,SAAS,CAAC,CAAC;EAC5D","file":"./dist/react-draggable.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 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 diff --git a/dist/react-draggable.min.js b/dist/react-draggable.min.js index 1117c585..48c70223 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 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.deltaX = x - s.scrollX;\n coreEvent.deltaY = y - s.scrollY;\n\n this.setState({\n lastX: s.lastX + coreEvent.deltaX,\n lastY: s.lastY + coreEvent.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 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":["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","shouldUpdate","newState","deltaX","deltaY","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","left","Number","right","top","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","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","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","_get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I;AAC1B,aAAM,EAAE,IAAI;AACZ,WAAI,EAAE,IAAI;AACV,gBAAS,EAAE,IAAI;AACf,cAAO,EAAE,mBAAU,EAAE;AACrB,aAAM,EAAE,kBAAU,EAAE;AACpB,aAAM,EAAE,kBAAU,EAAE;AACpB,kBAAW,EAAE,uBAAU,EAAE;MAC1B;;;;UA/LkB,aAAa;IAAS,mBAAM,SAAS;;sBAArC,aAAa;;;;;;;;;;;;;;;;;;;sBC/BV,GAAG;;AAAZ,UAAS,GAAG,GAAG;AAC5B,OAAI,WAA2B,EAAE,OAAO,CAAC,GAAG,OAAX,OAAO,EAAQ,SAAS,CAAC,CAAC;EAC5D","file":"./dist/react-draggable.js","sourceRoot":"","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 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 **/"]} \ No newline at end of file diff --git a/package.json b/package.json index 6c61b950..984d40af 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "1.1.0", + "version": "1.1.1", "description": "React draggable component", "main": "dist/react-draggable.js", "browser": "dist/react-draggable.js",