From cb7d899381ccf548c78ae83ee0a6fd13370a42c7 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Thu, 14 Apr 2016 19:35:44 -0500 Subject: [PATCH] release v2.0.0-beta2 --- CHANGELOG.md | 8 +++++++ bower.json | 2 +- dist/react-draggable.js | 41 ++++++++++++++++++++++++++------- dist/react-draggable.js.map | 2 +- dist/react-draggable.min.js | 2 +- dist/react-draggable.min.js.map | 2 +- package.json | 2 +- 7 files changed, 46 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f08ea499..77d495e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### 2.0.0-beta2 (Apr 14, 2016) + +- We're making a small deviation from React Core's controlled vs. uncontrolled scheme; for convenience, + ``s with a `position` property will still be draggable, but will revert to their old position + on drag stop. Attach an `onStop` or `onDrag` handler to synchronize state. + - A warning has been added informing users of this. If you make `` controlled but no callback + handlers, a warning will be printed. + ### 2.0.0-beta1 (Apr 14, 2016) - Due to API changes, this is a major release. diff --git a/bower.json b/bower.json index 560c07cb..0c1d42bb 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "2.0.0-beta1", + "version": "2.0.0-beta2", "homepage": "https://github.com/mzabriskie/react-draggable", "authors": [ "Matt Zabriskie", diff --git a/dist/react-draggable.js b/dist/react-draggable.js index b2b40710..fbb9657e 100644 --- a/dist/react-draggable.js +++ b/dist/react-draggable.js @@ -214,15 +214,37 @@ return /******/ (function(modules) { // webpackBootstrap (0, _log2.default)('Draggable: onDragStop: %j', coreData); - _this.setState({ + var newState = { dragging: false, slackX: 0, slackY: 0 - }); + }; + + // If this is a controlled component, the result of this operation will be to + // revert back to the old position. We expect a handler on `onDragStop`, at the least. + var controlled = Boolean(_this.props.position); + if (controlled) { + var _this$props$position = _this.props.position; + var _x2 = _this$props$position.x; + var _y2 = _this$props$position.y; + + newState.x = _x2; + newState.y = _y2; + } + + _this.setState(newState); }, _temp), _possibleConstructorReturn(_this, _ret); } _createClass(Draggable, [{ + key: 'componentWillMount', + value: function componentWillMount() { + if (this.props.position && !(this.props.onDrag || this.props.onStop)) { + // eslint-disable-next-line + console.warn('A `position` was applied to this , without drag handlers. This will make this ' + 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' + '`position` of this element.'); + } + } + }, { key: 'componentDidMount', value: function componentDidMount() { // Check to see if the element passed is an instanceof SVGElement @@ -249,24 +271,27 @@ return /******/ (function(modules) { // webpackBootstrap var style = {}, svgTransform = null; - // Add a CSS transform to move the element around. This allows us to move the element around - // without worrying about whether or not it is relatively or absolutely positioned. - // If the item you are dragging already has a transform set, wrap it in a so - // has a clean slate. + // If this is controlled, we don't want to move it - unless it's dragging. var controlled = Boolean(this.props.position); + var draggable = !controlled || this.state.dragging; + var position = this.props.position || this.props.defaultPosition; var transformOpts = { // Set left if horizontal drag is enabled - x: (0, _positionFns.canDragX)(this) && !controlled ? this.state.x : position.x, + x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : position.x, // Set top if vertical drag is enabled - y: (0, _positionFns.canDragY)(this) && !controlled ? this.state.y : position.y + y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : position.y }; // If this element was SVG, we use the `transform` attribute. if (this.state.isElementSVG) { svgTransform = (0, _domFns.createSVGTransform)(transformOpts); } else { + // Add a CSS transform to move the element around. This allows us to move the element around + // without worrying about whether or not it is relatively or absolutely positioned. + // If the item you are dragging already has a transform set, wrap it in a so + // has a clean slate. style = (0, _domFns.createCSSTransform)(transformOpts); } diff --git a/dist/react-draggable.js.map b/dist/react-draggable.js.map index 5305e5f0..17dead97 100644 --- a/dist/react-draggable.js.map +++ b/dist/react-draggable.js.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap da61f1175b2a5258dc2a",".././index.js",".././lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}",".././~/classnames/index.js",".././lib/utils/domFns.es6",".././lib/utils/shims.es6",".././lib/utils/getPrefix.es6",".././lib/utils/positionFns.es6",".././lib/DraggableCore.es6",".././lib/utils/log.es6"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA,QAAO,OAAP,GAAiB,oBAAQ,CAAR,EAA2B,OAA3B;AACjB,QAAO,OAAP,CAAe,aAAf,GAA+B,oBAAQ,CAAR,EAA+B,OAA/B,C;;;;;;;;;;;;;;;;;;ACA/B;;;;AACA;;;;AAEA;;;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;KAeqB;;;;;;;;;;;;;;wMA2HnB,QAAwB;;AAEtB,iBAAU,KAAV;;;AAGA,gBAAS,KAAT;;;AAGA,UAAG,MAAK,KAAL,CAAW,QAAX,GAAsB,MAAK,KAAL,CAAW,QAAX,CAAoB,CAApB,GAAwB,MAAK,KAAL,CAAW,eAAX,CAA2B,CAA3B;AACjD,UAAG,MAAK,KAAL,CAAW,QAAX,GAAsB,MAAK,KAAL,CAAW,QAAX,CAAoB,CAApB,GAAwB,MAAK,KAAL,CAAW,eAAX,CAA2B,CAA3B;;;AAGjD,eAAQ,CAAR,EAAW,QAAQ,CAAR;;;AAGX,qBAAc,KAAd;cA0BF,cAAqC,UAAC,CAAD,EAAI,QAAJ,EAAiB;AACpD,0BAAI,4BAAJ,EAAkC,QAAlC;;;AADoD,WAI9C,cAAc,MAAK,KAAL,CAAW,OAAX,CAAmB,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;;;;;;;AAOV,yBAAsB,iBAAU,IAAV;;;;;AAKtB,SAAM,iBAAU,OAAV,CAAkB,iBAAU,MAAV,CAAxB;;;;;;;;;;;;;;;;;;;;;;AAsBA,WAAQ,iBAAU,MAAV;;;;;;;;;;;;;;;;;;;;;;AAsBR,WAAQ,iBAAU,MAAV;;;;;;AAMR,YAAS,iBAAU,IAAV;;;;;;AAMT,WAAQ,iBAAU,IAAV;;;;;;AAMR,WAAQ,iBAAU,IAAV;;;;;;AAMR,gBAAa,iBAAU,IAAV;;;;;AAKb,8BAlGiB;AAmGjB,0BAnGiB;AAoGjB,8BApGiB;;AAJA,eA2GZ,eAAe;AACpB,kBAAe,KAAf;AACA,WAAQ,IAAR;AACA,aAAU,KAAV;AACA,yBAAsB,IAAtB;AACA,WAAQ,IAAR;AACA,SAAM,IAAN;AACA,cAAW,IAAX;AACA,YAAS,mBAAU,EAAV;AACT,WAAQ,kBAAU,EAAV;AACR,WAAQ,kBAAU,EAAV;AACR,gBAAa,uBAAU,EAAV;;mBAtHI,c;;;;;;;;;;;mBCvCG;;;AAAT,UAAS,GAAT,GAA2B;;;AACxC,OAAI,aAA6B,qBAAQ,GAAR,4BAAjC","file":"./dist/react-draggable.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap da61f1175b2a5258dc2a\n **/","module.exports = require('./lib/Draggable').default;\nmodule.exports.DraggableCore = require('./lib/DraggableCore').default;\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","// @flow\nimport React, {PropTypes} from 'react';\nimport ReactDOM from 'react-dom';\n// $FlowIgnore\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\n\ntype DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\n//\n// Define \n//\n\nexport default class Draggable extends React.Component {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number,\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n /**\n * `defaultPosition` 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 defaultPosition: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\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 position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n defaultPosition: {x: 0, y: 0},\n position: null\n };\n\n state: DraggableState = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n x: this.props.position ? this.props.position.x : this.props.defaultPosition.x,\n y: this.props.position ? this.props.position.y : this.props.defaultPosition.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(ReactDOM.findDOMNode(this) instanceof SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillReceiveProps(nextProps: Object) {\n // Set x/y if position has changed\n if (nextProps.position &&\n (!this.props.position ||\n nextProps.position.x !== this.props.position.x ||\n nextProps.position.y !== this.props.position.y\n )\n ) {\n this.setState({ x: nextProps.position.x, y: nextProps.position.y });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: DraggableEventHandler = (e, coreData) => {\n log('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreData);\n\n const uiData = createDraggableData(this, coreData);\n\n const newState: $Shape = {\n x: uiData.x,\n y: uiData.y\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {x, y} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n // $FlowBug\n [newState.x, newState.y] = getBoundPosition(this, newState.x, newState.y);\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = x;\n uiData.y = y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreData);\n\n this.setState({\n dragging: false,\n slackX: 0,\n slackY: 0\n });\n };\n\n render(): React.Element {\n let style = {}, svgTransform = null;\n\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a so \n // has a clean slate.\n const controlled = Boolean(this.props.position);\n const position = this.props.position || this.props.defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) && !controlled ?\n this.state.x :\n position.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) && !controlled ?\n this.state.y :\n position.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts);\n } else {\n style = createCSSTransform(transformOpts);\n }\n\n // Mark with class while dragging\n const className = classNames((this.props.children.props.className || ''), 'react-draggable', {\n 'react-draggable-dragging': this.state.dragging,\n 'react-draggable-dragged': this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(React.Children.only(this.props.children), {\n className: className,\n style: {...this.props.children.props.style, ...style},\n transform: svgTransform\n })}\n \n );\n }\n}\n\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/Draggable.es6\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}\n ** module id = 3\n ** module chunks = 0\n **/","/*!\n Copyright (c) 2016 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.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(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.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/classnames/index.js\n ** module id = 4\n ** module chunks = 0\n **/","// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {getPrefix, browserPrefixToStyle, browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc].call(el, selector);\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n const computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n const computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParentOf(e: MouseEvent, node: HTMLElement & {offsetParent: HTMLElement}): ControlPosition {\n const evt = e.targetTouches ? e.targetTouches[0] : e;\n\n const offsetParent = node.offsetParent || document.body;\n const offsetParentRect = node.offsetParent === document.body ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n const x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;\n const y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;\n\n return {x, y};\n}\n\nexport function createCSSTransform({x, y}: {x: number, y: number}): Object {\n // Replace unitless items with px\n return {[browserPrefixToKey('transform', browserPrefix)]: 'translate(' + x + 'px,' + y + 'px)'};\n}\n\nexport function createSVGTransform({x, y}: {x: number, y: number}): string {\n return 'translate(' + x + ',' + y + ')';\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\nconst userSelectPrefix = getPrefix('user-select');\nconst userSelect = browserPrefixToStyle('user-select', userSelectPrefix);\nconst userSelectStyle = `;${userSelect}: none;`;\n\nexport function addUserSelectStyles() {\n const style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nexport function removeUserSelectStyles() {\n const style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/domFns.es6\n **/","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/shims.es6\n **/","// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n const style = window.document.documentElement.style;\n\n if (prop in style) return '';\n\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/getPrefix.es6\n **/","// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {innerWidth, innerHeight, offsetXYFromParentOf, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = ReactDOM.findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = document.querySelector(bounds);\n if (!boundNode) throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const nodeStyle = window.getComputedStyle(node);\n const boundNodeStyle = window.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseEvent, draggableCore: DraggableCore): ControlPosition {\n return offsetXYFromParentOf(e, ReactDOM.findDOMNode(draggableCore));\n}\n\n// Create an data object exposed by 's events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n // State changes are often (but not always!) async. We want the latest value.\n const state = draggable._pendingState || draggable.state;\n const isStart = !isNum(state.lastX);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node: ReactDOM.findDOMNode(this),\n deltaX: 0, deltaY: 0,\n lastX: x, lastY: y,\n x: x, y: y\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node: ReactDOM.findDOMNode(this),\n deltaX: x - state.lastX, deltaY: y - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n x: x, y: y\n };\n }\n}\n\n// Create an data exposed by 's events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n return {\n node: coreData.node,\n x: draggable.state.x + coreData.deltaX,\n y: draggable.state.y + coreData.deltaY,\n deltaX: coreData.deltaX,\n deltaY: coreData.deltaY,\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/positionFns.es6\n **/","// @flow\nimport React, {PropTypes} from 'react';\nimport {matchesSelector, addEvent, removeEvent, addUserSelectStyles,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler} from './utils/types';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype CoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: number\n};\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n 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 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 onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\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 (as there is internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state: CoreState = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN, lastY: NaN,\n touchIdentifier: NaN\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: EventHandler = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (!(e.target instanceof Node)) ||\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 const {x, y} = getControlPosition(e, this);\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n const 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: x,\n lastY: y\n });\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler = (e) => {\n // Return if this is a touch event, but not the correct one for this element\n if (e.targetTouches && (e.targetTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n let {x, y} = getControlPosition(e, this);\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n this.handleDragStop(new MouseEvent());\n return;\n }\n\n this.setState({\n lastX: x,\n lastY: y\n });\n };\n\n handleDragStop: EventHandler = (e) => {\n if (!this.state.dragging) return;\n\n // Short circuit if this is not the correct touch event. `changedTouches` contains all\n // touch points that have been removed from the surface.\n if (e.changedTouches && (e.changedTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n\n const {x, y} = getControlPosition(e, this);\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\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, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n onMouseDown: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n };\n\n onMouseUp: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse;\n\n return this.handleDragStop(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n onTouchEnd: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStop(e);\n };\n\n render(): React.Element {\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.onMouseUp,\n onTouchEnd: this.onTouchEnd\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/DraggableCore.es6\n **/","// @flow\n/*eslint no-console:0*/\nexport default function log(...args: any) {\n if (process.env.DRAGGABLE_DEBUG) console.log(...args);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/log.es6\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 45868ded4cb7860818c0",".././index.js",".././lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}",".././~/classnames/index.js",".././lib/utils/domFns.es6",".././lib/utils/shims.es6",".././lib/utils/getPrefix.es6",".././lib/utils/positionFns.es6",".././lib/DraggableCore.es6",".././lib/utils/log.es6"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;ACtCA,QAAO,OAAP,GAAiB,oBAAQ,CAAR,EAA2B,OAA3B;AACjB,QAAO,OAAP,CAAe,aAAf,GAA+B,oBAAQ,CAAR,EAA+B,OAA/B,C;;;;;;;;;;;;;;;;;;ACA/B;;;;AACA;;;;AAEA;;;;AACA;;AACA;;AACA;;AACA;;;;AACA;;;;;;;;;;;;;;;;;;KAeqB;;;;;;;;;;;;;;wMA2HnB,QAAwB;;AAEtB,iBAAU,KAAV;;;AAGA,gBAAS,KAAT;;;AAGA,UAAG,MAAK,KAAL,CAAW,QAAX,GAAsB,MAAK,KAAL,CAAW,QAAX,CAAoB,CAApB,GAAwB,MAAK,KAAL,CAAW,eAAX,CAA2B,CAA3B;AACjD,UAAG,MAAK,KAAL,CAAW,QAAX,GAAsB,MAAK,KAAL,CAAW,QAAX,CAAoB,CAApB,GAAwB,MAAK,KAAL,CAAW,eAAX,CAA2B,CAA3B;;;AAGjD,eAAQ,CAAR,EAAW,QAAQ,CAAR;;;AAGX,qBAAc,KAAd;cAmCF,cAAqC,UAAC,CAAD,EAAI,QAAJ,EAAiB;AACpD,0BAAI,4BAAJ,EAAkC,QAAlC;;;AADoD,WAI9C,cAAc,MAAK,KAAL,CAAW,OAAX,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;;;AACxC,OAAI,aAA6B,qBAAQ,GAAR,4BAAjC","file":"./dist/react-draggable.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"react-dom\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\", \"react-dom\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"react\"), require(\"react-dom\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"], root[\"ReactDOM\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__, __WEBPACK_EXTERNAL_MODULE_3__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 45868ded4cb7860818c0\n **/","module.exports = require('./lib/Draggable').default;\nmodule.exports.DraggableCore = require('./lib/DraggableCore').default;\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","// @flow\nimport React, {PropTypes} from 'react';\nimport ReactDOM from 'react-dom';\n// $FlowIgnore\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\n\ntype DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\n//\n// Define \n//\n\nexport default class Draggable extends React.Component {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number,\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n /**\n * `defaultPosition` 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 defaultPosition: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\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 position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n defaultPosition: {x: 0, y: 0},\n position: null\n };\n\n state: DraggableState = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n x: this.props.position ? this.props.position.x : this.props.defaultPosition.x,\n y: this.props.position ? this.props.position.y : this.props.defaultPosition.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n componentWillMount() {\n if (this.props.position && !(this.props.onDrag || this.props.onStop)) {\n // eslint-disable-next-line\n console.warn('A `position` was applied to this , without drag handlers. This will make this ' +\n 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' +\n '`position` of this element.');\n }\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 componentWillReceiveProps(nextProps: Object) {\n // Set x/y if position has changed\n if (nextProps.position &&\n (!this.props.position ||\n nextProps.position.x !== this.props.position.x ||\n nextProps.position.y !== this.props.position.y\n )\n ) {\n this.setState({ x: nextProps.position.x, y: nextProps.position.y });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: DraggableEventHandler = (e, coreData) => {\n log('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreData);\n\n const uiData = createDraggableData(this, coreData);\n\n const newState: $Shape = {\n x: uiData.x,\n y: uiData.y\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {x, y} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n // $FlowBug\n [newState.x, newState.y] = getBoundPosition(this, newState.x, newState.y);\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = x;\n uiData.y = y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreData);\n\n const newState: $Shape = {\n dragging: false,\n slackX: 0,\n slackY: 0\n };\n\n // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n const controlled = Boolean(this.props.position);\n if (controlled) {\n const {x, y} = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n\n this.setState(newState);\n };\n\n render(): React.Element {\n let style = {}, svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(this.props.position);\n const draggable = !controlled || this.state.dragging;\n\n const position = this.props.position || this.props.defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) && draggable ?\n this.state.x :\n position.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) && draggable ?\n this.state.y :\n position.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts);\n } else {\n // 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 = createCSSTransform(transformOpts);\n }\n\n // Mark with class while dragging\n const className = classNames((this.props.children.props.className || ''), 'react-draggable', {\n 'react-draggable-dragging': this.state.dragging,\n 'react-draggable-dragged': this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n \n {React.cloneElement(React.Children.only(this.props.children), {\n className: className,\n style: {...this.props.children.props.style, ...style},\n transform: svgTransform\n })}\n \n );\n }\n}\n\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/Draggable.es6\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}\n ** module id = 2\n ** module chunks = 0\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_3__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}\n ** module id = 3\n ** module chunks = 0\n **/","/*!\n Copyright (c) 2016 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.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(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.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/classnames/index.js\n ** module id = 4\n ** module chunks = 0\n **/","// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {getPrefix, browserPrefixToStyle, browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc].call(el, selector);\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n const computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n const computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParentOf(e: MouseEvent, node: HTMLElement & {offsetParent: HTMLElement}): ControlPosition {\n const evt = e.targetTouches ? e.targetTouches[0] : e;\n\n const offsetParent = node.offsetParent || document.body;\n const offsetParentRect = node.offsetParent === document.body ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n const x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;\n const y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;\n\n return {x, y};\n}\n\nexport function createCSSTransform({x, y}: {x: number, y: number}): Object {\n // Replace unitless items with px\n return {[browserPrefixToKey('transform', browserPrefix)]: 'translate(' + x + 'px,' + y + 'px)'};\n}\n\nexport function createSVGTransform({x, y}: {x: number, y: number}): string {\n return 'translate(' + x + ',' + y + ')';\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\nconst userSelectPrefix = getPrefix('user-select');\nconst userSelect = browserPrefixToStyle('user-select', userSelectPrefix);\nconst userSelectStyle = `;${userSelect}: none;`;\n\nexport function addUserSelectStyles() {\n const style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nexport function removeUserSelectStyles() {\n const style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/domFns.es6\n **/","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/shims.es6\n **/","// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n const style = window.document.documentElement.style;\n\n if (prop in style) return '';\n\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/getPrefix.es6\n **/","// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {innerWidth, innerHeight, offsetXYFromParentOf, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = ReactDOM.findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = document.querySelector(bounds);\n if (!boundNode) throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const nodeStyle = window.getComputedStyle(node);\n const boundNodeStyle = window.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseEvent, draggableCore: DraggableCore): ControlPosition {\n return offsetXYFromParentOf(e, ReactDOM.findDOMNode(draggableCore));\n}\n\n// Create an data object exposed by 's events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n // State changes are often (but not always!) async. We want the latest value.\n const state = draggable._pendingState || draggable.state;\n const isStart = !isNum(state.lastX);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node: ReactDOM.findDOMNode(this),\n deltaX: 0, deltaY: 0,\n lastX: x, lastY: y,\n x: x, y: y\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node: ReactDOM.findDOMNode(this),\n deltaX: x - state.lastX, deltaY: y - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n x: x, y: y\n };\n }\n}\n\n// Create an data exposed by 's events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n return {\n node: coreData.node,\n x: draggable.state.x + coreData.deltaX,\n y: draggable.state.y + coreData.deltaY,\n deltaX: coreData.deltaX,\n deltaY: coreData.deltaY,\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/positionFns.es6\n **/","// @flow\nimport React, {PropTypes} from 'react';\nimport {matchesSelector, addEvent, removeEvent, addUserSelectStyles,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler} from './utils/types';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype CoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: number\n};\n\n//\n// Define .\n//\n// is for advanced usage of . It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n 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 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 onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\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 (as there is internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state: CoreState = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN, lastY: NaN,\n touchIdentifier: NaN\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: EventHandler = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (!(e.target instanceof Node)) ||\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 const {x, y} = getControlPosition(e, this);\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n const 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: x,\n lastY: y\n });\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler = (e) => {\n // Return if this is a touch event, but not the correct one for this element\n if (e.targetTouches && (e.targetTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n let {x, y} = getControlPosition(e, this);\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n this.handleDragStop(new MouseEvent());\n return;\n }\n\n this.setState({\n lastX: x,\n lastY: y\n });\n };\n\n handleDragStop: EventHandler = (e) => {\n if (!this.state.dragging) return;\n\n // Short circuit if this is not the correct touch event. `changedTouches` contains all\n // touch points that have been removed from the surface.\n if (e.changedTouches && (e.changedTouches[0].identifier !== this.state.touchIdentifier)) return;\n\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles();\n\n const {x, y} = getControlPosition(e, this);\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\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, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.stop, this.handleDragStop);\n };\n\n onMouseDown: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n };\n\n onMouseUp: EventHandler = (e) => {\n dragEventFor = eventsFor.mouse;\n\n return this.handleDragStop(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n onTouchEnd: EventHandler = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStop(e);\n };\n\n render(): React.Element {\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.onMouseUp,\n onTouchEnd: this.onTouchEnd\n });\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/DraggableCore.es6\n **/","// @flow\n/*eslint no-console:0*/\nexport default function log(...args: any) {\n if (process.env.DRAGGABLE_DEBUG) console.log(...args);\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/utils/log.es6\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/react-draggable.min.js b/dist/react-draggable.min.js index 8bbf3057..df056d1a 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)["default"],module.exports.DraggableCore=__webpack_require__(9)["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i_key;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_Object$getPrototypeO=Object.getPrototypeOf(Draggable)).call.apply(_Object$getPrototypeO,[this].concat(args))),_this.state={dragging:!1,dragged:!1,x:_this.props.position?_this.props.position.x:_this.props.defaultPosition.x,y:_this.props.position?_this.props.position.y:_this.props.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},_this.onDragStart=function(e,coreData){(0,_log2["default"])("Draggable: onDragStart: %j",coreData);var shouldStart=_this.props.onStart(e,(0,_positionFns.createDraggableData)(_this,coreData));return shouldStart===!1?!1:void _this.setState({dragging:!0,dragged:!0})},_this.onDrag=function(e,coreData){if(!_this.state.dragging)return!1;(0,_log2["default"])("Draggable: onDrag: %j",coreData);var uiData=(0,_positionFns.createDraggableData)(_this,coreData),newState={x:uiData.x,y:uiData.y};if(_this.props.bounds){var _x=newState.x,_y=newState.y;newState.x+=_this.state.slackX,newState.y+=_this.state.slackY;var _getBoundPosition=(0,_positionFns.getBoundPosition)(_this,newState.x,newState.y),_getBoundPosition2=_slicedToArray(_getBoundPosition,2);newState.x=_getBoundPosition2[0],newState.y=_getBoundPosition2[1],newState.slackX=_this.state.slackX+(_x-newState.x),newState.slackY=_this.state.slackY+(_y-newState.y),uiData.x=_x,uiData.y=_y,uiData.deltaX=newState.x-_this.state.x,uiData.deltaY=newState.y-_this.state.y}var shouldUpdate=_this.props.onDrag(e,uiData);return shouldUpdate===!1?!1:void _this.setState(newState)},_this.onDragStop=function(e,coreData){if(!_this.state.dragging)return!1;var shouldStop=_this.props.onStop(e,(0,_positionFns.createDraggableData)(_this,coreData));return shouldStop===!1?!1:((0,_log2["default"])("Draggable: onDragStop: %j",coreData),void _this.setState({dragging:!1,slackX:0,slackY:0}))},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(Draggable,_React$Component),_createClass(Draggable,[{key:"componentDidMount",value:function(){_reactDom2["default"].findDOMNode(this)instanceof SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(nextProps){!nextProps.position||this.props.position&&nextProps.position.x===this.props.position.x&&nextProps.position.y===this.props.position.y||this.setState({x:nextProps.position.x,y:nextProps.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var style={},svgTransform=null,controlled=Boolean(this.props.position),position=this.props.position||this.props.defaultPosition,transformOpts={x:(0,_positionFns.canDragX)(this)&&!controlled?this.state.x:position.x,y:(0,_positionFns.canDragY)(this)&&!controlled?this.state.y:position.y};this.state.isElementSVG?svgTransform=(0,_domFns.createSVGTransform)(transformOpts):style=(0,_domFns.createCSSTransform)(transformOpts);var className=(0,_classnames2["default"])(this.props.children.props.className||"","react-draggable",{"react-draggable-dragging":this.state.dragging,"react-draggable-dragged":this.state.dragged});return _react2["default"].createElement(_DraggableCore2["default"],_extends({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),_react2["default"].cloneElement(_react2["default"].Children.only(this.props.children),{className:className,style:_extends({},this.props.children.props.style,style),transform:svgTransform}))}}]),Draggable}(_react2["default"].Component);Draggable.displayName="Draggable",Draggable.propTypes=_extends({},_DraggableCore2["default"].propTypes,{axis:_react.PropTypes.oneOf(["both","x","y","none"]),bounds:_react.PropTypes.oneOfType([_react.PropTypes.shape({left:_react.PropTypes.number,right:_react.PropTypes.number,top:_react.PropTypes.number,bottom:_react.PropTypes.number}),_react.PropTypes.string,_react.PropTypes.oneOf([!1])]),defaultPosition:_react.PropTypes.shape({x:_react.PropTypes.number,y:_react.PropTypes.number}),position:_react.PropTypes.shape({x:_react.PropTypes.number,y:_react.PropTypes.number}),className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe}),Draggable.defaultProps=_extends({},_DraggableCore2["default"].defaultProps,{axis:"both",bounds:!1,defaultPosition:{x:0,y:0},position:null}),exports["default"]=Draggable},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_3__},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";function classNames(){for(var classes=[],i=0;ii;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]}function isFunction(func){return"function"==typeof func||"[object Function]"===Object.prototype.toString.call(func)}function isNum(num){return"number"==typeof num&&!isNaN(num)}function int(a){return parseInt(a,10)}function dontSetMe(props,propName,componentName){return props[propName]?new Error("Invalid prop "+propName+" passed to "+componentName+" - do not set this, set it on the child."):void 0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.findInArray=findInArray,exports.isFunction=isFunction,exports.isNum=isNum,exports["int"]=int,exports.dontSetMe=dontSetMe},function(module,exports){"use strict";function getPrefix(){var prop=arguments.length<=0||void 0===arguments[0]?"transform":arguments[0];if("undefined"==typeof window||"undefined"==typeof window.document)return"";var style=window.document.documentElement.style;if(prop in style)return"";for(var i=0;i_key;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_Object$getPrototypeO=Object.getPrototypeOf(DraggableCore)).call.apply(_Object$getPrototypeO,[this].concat(args))),_this.state={dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:NaN},_this.handleDragStart=function(e){if(_this.props.onMouseDown(e),!_this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;if(!(_this.props.disabled||!(e.target instanceof Node)||_this.props.handle&&!(0,_domFns.matchesSelector)(e.target,_this.props.handle)||_this.props.cancel&&(0,_domFns.matchesSelector)(e.target,_this.props.cancel))){e.targetTouches&&_this.setState({touchIdentifier:e.targetTouches[0].identifier}),_this.props.enableUserSelectHack&&(0,_domFns.addUserSelectStyles)();var _getControlPosition=(0,_positionFns.getControlPosition)(e,_this),x=_getControlPosition.x,y=_getControlPosition.y,coreEvent=(0,_positionFns.createCoreData)(_this,x,y);(0,_log2["default"])("DraggableCore: handleDragStart: %j",coreEvent),(0,_log2["default"])("calling",_this.props.onStart);var shouldUpdate=_this.props.onStart(e,coreEvent);shouldUpdate!==!1&&(_this.setState({dragging:!0,lastX:x,lastY:y}),(0,_domFns.addEvent)(document,dragEventFor.move,_this.handleDrag),(0,_domFns.addEvent)(document,dragEventFor.stop,_this.handleDragStop))}},_this.handleDrag=function(e){if(!e.targetTouches||e.targetTouches[0].identifier===_this.state.touchIdentifier){var _getControlPosition2=(0,_positionFns.getControlPosition)(e,_this),x=_getControlPosition2.x,y=_getControlPosition2.y;if(Array.isArray(_this.props.grid)){var deltaX=x-_this.state.lastX,deltaY=y-_this.state.lastY,_snapToGrid=(0,_positionFns.snapToGrid)(_this.props.grid,deltaX,deltaY),_snapToGrid2=_slicedToArray(_snapToGrid,2);if(deltaX=_snapToGrid2[0],deltaY=_snapToGrid2[1],!deltaX&&!deltaY)return;x=_this.state.lastX+deltaX,y=_this.state.lastY+deltaY}var coreEvent=(0,_positionFns.createCoreData)(_this,x,y);(0,_log2["default"])("DraggableCore: handleDrag: %j",coreEvent);var shouldUpdate=_this.props.onDrag(e,coreEvent);return shouldUpdate===!1?void _this.handleDragStop(new MouseEvent):void _this.setState({lastX:x,lastY:y})}},_this.handleDragStop=function(e){if(_this.state.dragging&&(!e.changedTouches||e.changedTouches[0].identifier===_this.state.touchIdentifier)){_this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)();var _getControlPosition3=(0,_positionFns.getControlPosition)(e,_this),x=_getControlPosition3.x,y=_getControlPosition3.y,coreEvent=(0,_positionFns.createCoreData)(_this,x,y);(0,_log2["default"])("DraggableCore: handleDragStop: %j",coreEvent),_this.setState({dragging:!1,lastX:NaN,lastY:NaN}),_this.props.onStop(e,coreEvent),(0,_log2["default"])("DraggableCore: Removing handlers"),(0,_domFns.removeEvent)(document,dragEventFor.move,_this.handleDrag),(0,_domFns.removeEvent)(document,dragEventFor.stop,_this.handleDragStop)}},_this.onMouseDown=function(e){return dragEventFor=eventsFor.mouse,_this.handleDragStart(e)},_this.onMouseUp=function(e){return dragEventFor=eventsFor.mouse,_this.handleDragStop(e)},_this.onTouchStart=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStart(e)},_this.onTouchEnd=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStop(e)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(DraggableCore,_React$Component),_createClass(DraggableCore,[{key:"componentWillUnmount",value:function(){(0,_domFns.removeEvent)(document,eventsFor.mouse.move,this.handleDrag),(0,_domFns.removeEvent)(document,eventsFor.touch.move,this.handleDrag),(0,_domFns.removeEvent)(document,eventsFor.mouse.stop,this.handleDragStop),(0,_domFns.removeEvent)(document,eventsFor.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)()}},{key:"render",value:function(){return _react2["default"].cloneElement(_react2["default"].Children.only(this.props.children),{style:(0,_domFns.styleHacks)(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),DraggableCore}(_react2["default"].Component);DraggableCore.displayName="DraggableCore",DraggableCore.propTypes={allowAnyClick:_react.PropTypes.bool,disabled:_react.PropTypes.bool,enableUserSelectHack:_react.PropTypes.bool,grid:_react.PropTypes.arrayOf(_react.PropTypes.number),handle:_react.PropTypes.string,cancel:_react.PropTypes.string,onStart:_react.PropTypes.func,onDrag:_react.PropTypes.func,onStop:_react.PropTypes.func,onMouseDown:_react.PropTypes.func,className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe},DraggableCore.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}},exports["default"]=DraggableCore},function(module,exports,__webpack_require__){"use strict";function log(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=log}])}); +!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)["default"],module.exports.DraggableCore=__webpack_require__(9)["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(self,call){if(!self)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!call||"object"!=typeof call&&"function"!=typeof call?self:call}function _inherits(subClass,superClass){if("function"!=typeof superClass&&null!==superClass)throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:!1,writable:!0,configurable:!0}}),superClass&&(Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass)}Object.defineProperty(exports,"__esModule",{value:!0});var _extends=Object.assign||function(target){for(var i=1;i_key;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_Object$getPrototypeO=Object.getPrototypeOf(Draggable)).call.apply(_Object$getPrototypeO,[this].concat(args))),_this.state={dragging:!1,dragged:!1,x:_this.props.position?_this.props.position.x:_this.props.defaultPosition.x,y:_this.props.position?_this.props.position.y:_this.props.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},_this.onDragStart=function(e,coreData){(0,_log2["default"])("Draggable: onDragStart: %j",coreData);var shouldStart=_this.props.onStart(e,(0,_positionFns.createDraggableData)(_this,coreData));return shouldStart===!1?!1:void _this.setState({dragging:!0,dragged:!0})},_this.onDrag=function(e,coreData){if(!_this.state.dragging)return!1;(0,_log2["default"])("Draggable: onDrag: %j",coreData);var uiData=(0,_positionFns.createDraggableData)(_this,coreData),newState={x:uiData.x,y:uiData.y};if(_this.props.bounds){var _x=newState.x,_y=newState.y;newState.x+=_this.state.slackX,newState.y+=_this.state.slackY;var _getBoundPosition=(0,_positionFns.getBoundPosition)(_this,newState.x,newState.y),_getBoundPosition2=_slicedToArray(_getBoundPosition,2);newState.x=_getBoundPosition2[0],newState.y=_getBoundPosition2[1],newState.slackX=_this.state.slackX+(_x-newState.x),newState.slackY=_this.state.slackY+(_y-newState.y),uiData.x=_x,uiData.y=_y,uiData.deltaX=newState.x-_this.state.x,uiData.deltaY=newState.y-_this.state.y}var shouldUpdate=_this.props.onDrag(e,uiData);return shouldUpdate===!1?!1:void _this.setState(newState)},_this.onDragStop=function(e,coreData){if(!_this.state.dragging)return!1;var shouldStop=_this.props.onStop(e,(0,_positionFns.createDraggableData)(_this,coreData));if(shouldStop===!1)return!1;(0,_log2["default"])("Draggable: onDragStop: %j",coreData);var newState={dragging:!1,slackX:0,slackY:0},controlled=Boolean(_this.props.position);if(controlled){var _this$props$position=_this.props.position,_x2=_this$props$position.x,_y2=_this$props$position.y;newState.x=_x2,newState.y=_y2}_this.setState(newState)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(Draggable,_React$Component),_createClass(Draggable,[{key:"componentWillMount",value:function(){!this.props.position||this.props.onDrag||this.props.onStop||console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}},{key:"componentDidMount",value:function(){_reactDom2["default"].findDOMNode(this)instanceof SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(nextProps){!nextProps.position||this.props.position&&nextProps.position.x===this.props.position.x&&nextProps.position.y===this.props.position.y||this.setState({x:nextProps.position.x,y:nextProps.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var style={},svgTransform=null,controlled=Boolean(this.props.position),draggable=!controlled||this.state.dragging,position=this.props.position||this.props.defaultPosition,transformOpts={x:(0,_positionFns.canDragX)(this)&&draggable?this.state.x:position.x,y:(0,_positionFns.canDragY)(this)&&draggable?this.state.y:position.y};this.state.isElementSVG?svgTransform=(0,_domFns.createSVGTransform)(transformOpts):style=(0,_domFns.createCSSTransform)(transformOpts);var className=(0,_classnames2["default"])(this.props.children.props.className||"","react-draggable",{"react-draggable-dragging":this.state.dragging,"react-draggable-dragged":this.state.dragged});return _react2["default"].createElement(_DraggableCore2["default"],_extends({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),_react2["default"].cloneElement(_react2["default"].Children.only(this.props.children),{className:className,style:_extends({},this.props.children.props.style,style),transform:svgTransform}))}}]),Draggable}(_react2["default"].Component);Draggable.displayName="Draggable",Draggable.propTypes=_extends({},_DraggableCore2["default"].propTypes,{axis:_react.PropTypes.oneOf(["both","x","y","none"]),bounds:_react.PropTypes.oneOfType([_react.PropTypes.shape({left:_react.PropTypes.number,right:_react.PropTypes.number,top:_react.PropTypes.number,bottom:_react.PropTypes.number}),_react.PropTypes.string,_react.PropTypes.oneOf([!1])]),defaultPosition:_react.PropTypes.shape({x:_react.PropTypes.number,y:_react.PropTypes.number}),position:_react.PropTypes.shape({x:_react.PropTypes.number,y:_react.PropTypes.number}),className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe}),Draggable.defaultProps=_extends({},_DraggableCore2["default"].defaultProps,{axis:"both",bounds:!1,defaultPosition:{x:0,y:0},position:null}),exports["default"]=Draggable},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_3__},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;!function(){"use strict";function classNames(){for(var classes=[],i=0;ii;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]}function isFunction(func){return"function"==typeof func||"[object Function]"===Object.prototype.toString.call(func)}function isNum(num){return"number"==typeof num&&!isNaN(num)}function int(a){return parseInt(a,10)}function dontSetMe(props,propName,componentName){return props[propName]?new Error("Invalid prop "+propName+" passed to "+componentName+" - do not set this, set it on the child."):void 0}Object.defineProperty(exports,"__esModule",{value:!0}),exports.findInArray=findInArray,exports.isFunction=isFunction,exports.isNum=isNum,exports["int"]=int,exports.dontSetMe=dontSetMe},function(module,exports){"use strict";function getPrefix(){var prop=arguments.length<=0||void 0===arguments[0]?"transform":arguments[0];if("undefined"==typeof window||"undefined"==typeof window.document)return"";var style=window.document.documentElement.style;if(prop in style)return"";for(var i=0;i_key;_key++)args[_key]=arguments[_key];return _temp=_this=_possibleConstructorReturn(this,(_Object$getPrototypeO=Object.getPrototypeOf(DraggableCore)).call.apply(_Object$getPrototypeO,[this].concat(args))),_this.state={dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:NaN},_this.handleDragStart=function(e){if(_this.props.onMouseDown(e),!_this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;if(!(_this.props.disabled||!(e.target instanceof Node)||_this.props.handle&&!(0,_domFns.matchesSelector)(e.target,_this.props.handle)||_this.props.cancel&&(0,_domFns.matchesSelector)(e.target,_this.props.cancel))){e.targetTouches&&_this.setState({touchIdentifier:e.targetTouches[0].identifier}),_this.props.enableUserSelectHack&&(0,_domFns.addUserSelectStyles)();var _getControlPosition=(0,_positionFns.getControlPosition)(e,_this),x=_getControlPosition.x,y=_getControlPosition.y,coreEvent=(0,_positionFns.createCoreData)(_this,x,y);(0,_log2["default"])("DraggableCore: handleDragStart: %j",coreEvent),(0,_log2["default"])("calling",_this.props.onStart);var shouldUpdate=_this.props.onStart(e,coreEvent);shouldUpdate!==!1&&(_this.setState({dragging:!0,lastX:x,lastY:y}),(0,_domFns.addEvent)(document,dragEventFor.move,_this.handleDrag),(0,_domFns.addEvent)(document,dragEventFor.stop,_this.handleDragStop))}},_this.handleDrag=function(e){if(!e.targetTouches||e.targetTouches[0].identifier===_this.state.touchIdentifier){var _getControlPosition2=(0,_positionFns.getControlPosition)(e,_this),x=_getControlPosition2.x,y=_getControlPosition2.y;if(Array.isArray(_this.props.grid)){var deltaX=x-_this.state.lastX,deltaY=y-_this.state.lastY,_snapToGrid=(0,_positionFns.snapToGrid)(_this.props.grid,deltaX,deltaY),_snapToGrid2=_slicedToArray(_snapToGrid,2);if(deltaX=_snapToGrid2[0],deltaY=_snapToGrid2[1],!deltaX&&!deltaY)return;x=_this.state.lastX+deltaX,y=_this.state.lastY+deltaY}var coreEvent=(0,_positionFns.createCoreData)(_this,x,y);(0,_log2["default"])("DraggableCore: handleDrag: %j",coreEvent);var shouldUpdate=_this.props.onDrag(e,coreEvent);return shouldUpdate===!1?void _this.handleDragStop(new MouseEvent):void _this.setState({lastX:x,lastY:y})}},_this.handleDragStop=function(e){if(_this.state.dragging&&(!e.changedTouches||e.changedTouches[0].identifier===_this.state.touchIdentifier)){_this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)();var _getControlPosition3=(0,_positionFns.getControlPosition)(e,_this),x=_getControlPosition3.x,y=_getControlPosition3.y,coreEvent=(0,_positionFns.createCoreData)(_this,x,y);(0,_log2["default"])("DraggableCore: handleDragStop: %j",coreEvent),_this.setState({dragging:!1,lastX:NaN,lastY:NaN}),_this.props.onStop(e,coreEvent),(0,_log2["default"])("DraggableCore: Removing handlers"),(0,_domFns.removeEvent)(document,dragEventFor.move,_this.handleDrag),(0,_domFns.removeEvent)(document,dragEventFor.stop,_this.handleDragStop)}},_this.onMouseDown=function(e){return dragEventFor=eventsFor.mouse,_this.handleDragStart(e)},_this.onMouseUp=function(e){return dragEventFor=eventsFor.mouse,_this.handleDragStop(e)},_this.onTouchStart=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStart(e)},_this.onTouchEnd=function(e){return dragEventFor=eventsFor.touch,_this.handleDragStop(e)},_ret=_temp,_possibleConstructorReturn(_this,_ret)}return _inherits(DraggableCore,_React$Component),_createClass(DraggableCore,[{key:"componentWillUnmount",value:function(){(0,_domFns.removeEvent)(document,eventsFor.mouse.move,this.handleDrag),(0,_domFns.removeEvent)(document,eventsFor.touch.move,this.handleDrag),(0,_domFns.removeEvent)(document,eventsFor.mouse.stop,this.handleDragStop),(0,_domFns.removeEvent)(document,eventsFor.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&(0,_domFns.removeUserSelectStyles)()}},{key:"render",value:function(){return _react2["default"].cloneElement(_react2["default"].Children.only(this.props.children),{style:(0,_domFns.styleHacks)(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),DraggableCore}(_react2["default"].Component);DraggableCore.displayName="DraggableCore",DraggableCore.propTypes={allowAnyClick:_react.PropTypes.bool,disabled:_react.PropTypes.bool,enableUserSelectHack:_react.PropTypes.bool,grid:_react.PropTypes.arrayOf(_react.PropTypes.number),handle:_react.PropTypes.string,cancel:_react.PropTypes.string,onStart:_react.PropTypes.func,onDrag:_react.PropTypes.func,onStop:_react.PropTypes.func,onMouseDown:_react.PropTypes.func,className:_shims.dontSetMe,style:_shims.dontSetMe,transform:_shims.dontSetMe},DraggableCore.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}},exports["default"]=DraggableCore},function(module,exports,__webpack_require__){"use strict";function log(){}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=log}])}); //# sourceMappingURL=dist/react-draggable.min.js \ No newline at end of file diff --git a/dist/react-draggable.min.js.map b/dist/react-draggable.min.js.map index 375a3ca4..34b5bd43 100644 --- a/dist/react-draggable.min.js.map +++ b/dist/react-draggable.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap da61f1175b2a5258dc2a","../index.js","../lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}","../~/classnames/index.js","../lib/utils/domFns.es6","../lib/utils/shims.es6","../lib/utils/getPrefix.es6","../lib/utils/positionFns.es6","../lib/DraggableCore.es6","../lib/utils/log.es6"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","__WEBPACK_EXTERNAL_MODULE_3__","__webpack_require__","moduleId","installedModules","id","loaded","modules","call","m","c","p","DraggableCore","_react","_reactDom","_classnames","_domFns","_positionFns","_shims","_DraggableCore","_log","Draggable","_React$Component","state","dragging","dragged","x","_this","props","position","defaultPosition","y","slackX","slackY","isElementSVG","onDragStart","e","coreData","_log2","shouldStart","onStart","createDraggableData","setState","onDrag","uiData","newState","bounds","_x","_y","getBoundPosition","_getBoundPosition2","deltaX","deltaY","shouldUpdate","onDragStop","shouldStop","onStop","_temp","_possibleConstructorReturn","_ret","_reactDom2","findDOMNode","SVGElement","nextProps","style","svgTransform","controlled","Boolean","transformOpts","canDragX","canDragY","createSVGTransform","createCSSTransform","className","_classnames2","children","react-draggable-dragging","react-draggable-dragged","_react2","createElement","cloneElement","Children","only","_extends","transform","Component","displayName","propTypes","_DraggableCore2","axis","PropTypes","oneOf","oneOfType","shape","left","number","right","top","bottom","string","dontSetMe","defaultProps","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","apply","key","hasOwn","join","hasOwnProperty","undefined","matchesSelector","el","selector","matchesSelectorFunc","findInArray","method","isFunction","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","outerHeight","node","height","clientHeight","computedStyle","window","getComputedStyle","borderTopWidth","borderBottomWidth","outerWidth","width","clientWidth","borderLeftWidth","borderRightWidth","innerHeight","paddingTop","paddingBottom","innerWidth","paddingLeft","paddingRight","offsetXYFromParentOf","evt","targetTouches","offsetParent","document","body","offsetParentRect","getBoundingClientRect","clientX","scrollLeft","clientY","scrollTop","_ref","_defineProperty","_getPrefix","browserPrefixToKey","_getPrefix2","_ref3","addUserSelectStyles","getAttribute","setAttribute","userSelectStyle","removeUserSelectStyles","replace","styleHacks","childStyle","touchAction","userSelectPrefix","getPrefix","userSelect","browserPrefixToStyle","array","callback","func","Object","prototype","toString","isNum","num","isNaN","int","a","parseInt","propName","componentName","Error","prop","documentElement","prefixes","prefix","kebabToTitleCase","toLowerCase","str","out","shouldCapitalize","toUpperCase","draggable","cloneBounds","boundNode","parentNode","querySelector","nodeStyle","boundNodeStyle","offsetLeft","marginLeft","offsetTop","marginTop","Math","min","max","snapToGrid","grid","pendingX","pendingY","round","getControlPosition","draggableCore","createCoreData","_pendingState","isStart","lastX","lastY","eventsFor","touch","start","move","stop","mouse","dragEventFor","NaN","touchIdentifier","handleDragStart","onMouseDown","allowAnyClick","button","disabled","target","Node","handle","cancel","identifier","enableUserSelectHack","_getControlPosition","coreEvent","handleDrag","handleDragStop","_getControlPosition2","_snapToGrid2","MouseEvent","changedTouches","_getControlPosition3","onMouseUp","onTouchStart","onTouchEnd","bool","arrayOf","log"],"mappings":"CAAA,SAAAA,KAAAC,SACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,QAAAG,QAAA,SAAAA,QAAA,cACA,kBAAAC,SAAAA,OAAAC,IACAD,QAAA,QAAA,aAAAJ,SACA,gBAAAC,SACAA,QAAA,eAAAD,QAAAG,QAAA,SAAAA,QAAA,cAEAJ,KAAA,eAAAC,QAAAD,KAAA,MAAAA,KAAA,WACCO,KAAA,SAAAC,8BAAAC,+BACD,yBCNA,QAAAC,qBAAAC,UAGA,GAAAC,iBAAAD,UACA,MAAAC,kBAAAD,UAAAT,OAGA,IAAAC,QAAAS,iBAAAD,WACAT,WACAW,GAAAF,SACAG,QAAA,EAUA,OANAC,SAAAJ,UAAAK,KAAAb,OAAAD,QAAAC,OAAAA,OAAAD,QAAAQ,qBAGAP,OAAAW,QAAA,EAGAX,OAAAD,QAvBA,GAAAU,oBAqCA,OATAF,qBAAAO,EAAAF,QAGAL,oBAAAQ,EAAAN,iBAGAF,oBAAAS,EAAA,GAGAT,oBAAA,8DCtCAP,QAAOD,QAAUQ,oBAAQ,GAARA,WACjBP,OAAOD,QAAQkB,cAAgBV,oBAAQ,GAARA,grECA/BW,OAAAX,oBAAA,0CACAY,UAAAZ,oBAAA,gDAEAa,YAAAb,oBAAA,oDACA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AAS,aACTG,OAAQ,aACRa,OAAQ,aACR+L,YAAa,iCAtHI3O,wECvCN,SAASmQ,kFAAAA","file":"dist/react-draggable.min.js","sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 45868ded4cb7860818c0","../index.js","../lib/Draggable.es6","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external {\"commonjs\":\"react-dom\",\"commonjs2\":\"react-dom\",\"amd\":\"react-dom\",\"root\":\"ReactDOM\"}","../~/classnames/index.js","../lib/utils/domFns.es6","../lib/utils/shims.es6","../lib/utils/getPrefix.es6","../lib/utils/positionFns.es6","../lib/DraggableCore.es6","../lib/utils/log.es6"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","__WEBPACK_EXTERNAL_MODULE_3__","__webpack_require__","moduleId","installedModules","id","loaded","modules","call","m","c","p","DraggableCore","_react","_reactDom","_classnames","_domFns","_positionFns","_shims","_DraggableCore","_log","Draggable","_React$Component","state","dragging","dragged","x","_this","props","position","defaultPosition","y","slackX","slackY","isElementSVG","onDragStart","e","coreData","_log2","shouldStart","onStart","createDraggableData","setState","onDrag","uiData","newState","bounds","_x","_y","getBoundPosition","_getBoundPosition2","deltaX","deltaY","shouldUpdate","onDragStop","shouldStop","onStop","controlled","Boolean","_x2","_this$props$position","_y2","_temp","_possibleConstructorReturn","_ret","console","warn","_reactDom2","findDOMNode","SVGElement","nextProps","style","svgTransform","draggable","transformOpts","canDragX","canDragY","createSVGTransform","createCSSTransform","className","_classnames2","children","react-draggable-dragging","react-draggable-dragged","_react2","createElement","cloneElement","Children","only","_extends","transform","Component","displayName","propTypes","_DraggableCore2","axis","PropTypes","oneOf","oneOfType","shape","left","number","right","top","bottom","string","dontSetMe","defaultProps","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","classNames","classes","i","arguments","length","arg","argType","push","Array","isArray","apply","key","hasOwn","join","hasOwnProperty","undefined","matchesSelector","el","selector","matchesSelectorFunc","findInArray","method","isFunction","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","outerHeight","node","height","clientHeight","computedStyle","window","getComputedStyle","borderTopWidth","borderBottomWidth","outerWidth","width","clientWidth","borderLeftWidth","borderRightWidth","innerHeight","paddingTop","paddingBottom","innerWidth","paddingLeft","paddingRight","offsetXYFromParentOf","evt","targetTouches","offsetParent","document","body","offsetParentRect","getBoundingClientRect","clientX","scrollLeft","clientY","scrollTop","_ref","_defineProperty","_getPrefix","browserPrefixToKey","_getPrefix2","_ref3","addUserSelectStyles","getAttribute","setAttribute","userSelectStyle","removeUserSelectStyles","replace","styleHacks","childStyle","touchAction","userSelectPrefix","getPrefix","userSelect","browserPrefixToStyle","array","callback","func","Object","prototype","toString","isNum","num","isNaN","int","a","parseInt","propName","componentName","Error","prop","documentElement","prefixes","prefix","kebabToTitleCase","toLowerCase","str","out","shouldCapitalize","toUpperCase","cloneBounds","boundNode","parentNode","querySelector","nodeStyle","boundNodeStyle","offsetLeft","marginLeft","offsetTop","marginTop","Math","min","max","snapToGrid","grid","pendingX","pendingY","round","getControlPosition","draggableCore","createCoreData","_pendingState","isStart","lastX","lastY","eventsFor","touch","start","move","stop","mouse","dragEventFor","NaN","touchIdentifier","handleDragStart","onMouseDown","allowAnyClick","button","disabled","target","Node","handle","cancel","identifier","enableUserSelectHack","_getControlPosition","coreEvent","handleDrag","handleDragStop","_getControlPosition2","_snapToGrid2","MouseEvent","changedTouches","_getControlPosition3","onMouseUp","onTouchStart","onTouchEnd","bool","arrayOf","log"],"mappings":"CAAA,SAAAA,KAAAC,SACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,QAAAG,QAAA,SAAAA,QAAA,cACA,kBAAAC,SAAAA,OAAAC,IACAD,QAAA,QAAA,aAAAJ,SACA,gBAAAC,SACAA,QAAA,eAAAD,QAAAG,QAAA,SAAAA,QAAA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AsB,EAAArP,QAAAuK,2DAwJrC,MAAOnG,SAAAA,WAAME,aAAaF,QAAAA,WAAMG,SAASC,KAAKzF,KAAK6B,MAAMqD,WACvDV,OAAO,EAAAvD,QAAAyK,YAAW1L,KAAK6B,MAAMqD,SAASrD,MAAM2C,OAI5CqL,YAAa7P,KAAK6P,YAClBoB,aAAcjR,KAAKiR,aACnBD,UAAWhR,KAAKgR,UAChBE,WAAYlR,KAAKkR,iBAvSFrQ,eAAsBwE,QAAAA,WAAMO,UAA5B/E,eAEZgF,YAAc,gBAFFhF,cAIZiF,WAOLgK,cAAehP,OAAAmF,UAAUkL,KAMzBnB,SAAUlP,OAAAmF,UAAUkL,KAOpBb,qBAAsBxP,OAAAmF,UAAUkL,KAKhC3C,KAAM1N,OAAAmF,UAAUmL,QAAQtQ,OAAAmF,UAAUK,QAsBlC6J,OAAQrP,OAAAmF,UAAUS,OAsBlB0J,OAAQtP,OAAAmF,UAAUS,OAMlBjE,QAAS3B,OAAAmF,UAAUkG,KAMnBvJ,OAAQ9B,OAAAmF,UAAUkG,KAMlB1I,OAAQ3C,OAAAmF,UAAUkG,KAMlB0D,YAAa/O,OAAAmF,UAAUkG,KAKvBnH,UAAA7D,OAAAwF,UACAnC,MAAArD,OAAAwF,UACAhB,UAAAxE,OAAAwF,WAxGiB9F,cA2GZ+F,cACLkJ,eAAe,EACfM,OAAQ,KACRJ,UAAU,EACVM,sBAAsB,EACtBH,OAAQ,KACR3B,KAAM,KACN7I,UAAW,KACXlD,QAAS,aACTG,OAAQ,aACRa,OAAQ,aACRoM,YAAa,iCAtHIhP,wECvCN,SAASwQ,kFAAAA","file":"dist/react-draggable.min.js","sourceRoot":""} \ No newline at end of file diff --git a/package.json b/package.json index 9c634720..960ec079 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "2.0.0-beta1", + "version": "2.0.0-beta2", "description": "React draggable component", "main": "dist/react-draggable.js", "browser": "dist/react-draggable.js",