diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f874b27..58170ddc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -108,3 +108,7 @@ ### 0.8.3 (Oct 12, 2015) - Bugfix: Short-circuiting drag throws due to `e.changedTouches` check. + +### 0.8.4 (Oct 15, 2015) + +- Bugfix: SVG elements now properly use `transform` attribute instead of `style`. Thanks @martinRoss diff --git a/bower.json b/bower.json index 6a3a93f5..bb8e632a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "0.8.3", + "version": "0.8.4", "homepage": "https://github.com/mzabriskie/react-draggable", "authors": [ "Matt Zabriskie" diff --git a/dist/react-draggable.js b/dist/react-draggable.js index b3101ff5..f15175bc 100644 --- a/dist/react-draggable.js +++ b/dist/react-draggable.js @@ -282,6 +282,9 @@ return /******/ (function(modules) { // webpackBootstrap return out; } + function createSVGTransform(args) { + return 'translate(' + args.x + ',' + args.y + ')'; + } // // End Helpers. @@ -526,7 +529,7 @@ return /******/ (function(modules) { // webpackBootstrap * A workaround option which can be passed if onMouseDown needs to be accessed, * since it'll always be blocked (due to that there's internal use of onMouseDown) */ - onMouseDown: React.PropTypes.func + onMouseDown: React.PropTypes.func, }, componentWillReceiveProps: function(newProps) { @@ -536,6 +539,13 @@ return /******/ (function(modules) { // webpackBootstrap } }, + componentDidMount: function() { + // Check to see if the element passed is an instanceof SVGElement + if( React.findDOMNode(this) instanceof SVGElement) { + this.setState({ isElementSVG: true }); + } + }, + componentWillUnmount: function() { // Remove any leftover event handlers removeEvent(document, dragEventFor.move, this.handleDrag); @@ -557,7 +567,7 @@ return /******/ (function(modules) { // webpackBootstrap onStart: emptyFunction, onDrag: emptyFunction, onStop: emptyFunction, - onMouseDown: emptyFunction + onMouseDown: emptyFunction, }; }, @@ -572,7 +582,11 @@ return /******/ (function(modules) { // webpackBootstrap offsetX: 0, offsetY: 0, // Current transform x and y. - clientX: props.start.x, clientY: props.start.y + clientX: props.start.x, clientY: props.start.y, + + // Can only determine if is SVG after mounted + isElementSVG: false + }; }, @@ -730,17 +744,33 @@ return /******/ (function(modules) { // webpackBootstrap // 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. - var transform = createCSSTransform({ - // Set left if horizontal drag is enabled - x: canDragX(this) ? - this.state.clientX : - this.props.start.x, - - // Set top if vertical drag is enabled - y: canDragY(this) ? - this.state.clientY : - this.props.start.y - }); + var transform = this.state.isElementSVG ? null : + createCSSTransform({ + // Set left if horizontal drag is enabled + x: canDragX(this) ? + this.state.clientX : + this.props.start.x, + + // Set top if vertical drag is enabled + y: canDragY(this) ? + this.state.clientY : + this.props.start.y + }); + + + var svgTransform = !this.state.isElementSVG ? null : + createSVGTransform({ + // Set left if horizontal drag is enabled + x: canDragX(this) ? + this.state.clientX : + this.props.start.x, + + // Set top if vertical drag is enabled + y: canDragY(this) ? + this.state.clientY : + this.props.start.y + }); + // Workaround IE pointer events; see #51 // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278 @@ -764,6 +794,7 @@ return /******/ (function(modules) { // webpackBootstrap // This makes it flexible to use whatever element is wanted (div, ul, etc) return React.cloneElement(React.Children.only(this.props.children), { style: style, + transform: svgTransform, className: className, onMouseDown: this.onMouseDown, diff --git a/dist/react-draggable.map b/dist/react-draggable.map index e745b1d2..6bdeee51 100644 --- a/dist/react-draggable.map +++ b/dist/react-draggable.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap d3662ae7a33f9226f8ef",".././index.js",".././lib/draggable.js","../external \"React\"",".././~/object-assign/index.js",".././~/classnames/index.js",".././lib/getPrefix.js"],"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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AAE,CAAC;;GAE7C,IAAI,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,CAAC;GAClE,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK;UACrB,IAAI,CAAC,MAAM,CAAC;UACZ,IAAI,CAAC,EAAE,CAAC;UACR,KAAK,CAAC,mBAAmB,CAAC,KAAK,MAAM,CAAC,KAAK,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACzE,SAAQ,CAAC,CAAC,CAAC;;GAET,IAAI,GAAG,KAAK,IAAI,EAAE,OAAO,GAAG,CAAC;GAC7B,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;EACrD,CAAC","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\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"React\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {\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 d3662ae7a33f9226f8ef\n **/","module.exports = require('./lib/draggable');\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","'use strict';\n\nvar React = require('react');\nvar emptyFunction = function(){};\nvar assign = require('object-assign');\nvar classNames = require('classnames');\nvar browserPrefix = require('./getPrefix')();\n\n//\n// Helpers. See Element definition below this section.\n//\n\nfunction createUIEvent(draggable) {\n // State changes are often (but not always!) async. We want the latest value.\n var state = draggable._pendingState || draggable.state;\n return {\n node: draggable.getDOMNode(),\n position: {\n top: state.clientY,\n left: state.clientX\n }\n };\n}\n\nfunction canDragX(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nfunction canDragY(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\nfunction isFunction(func) {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nfunction findInArray(array, callback) {\n for (var i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nvar matchesSelectorFunc = '';\nfunction matchesSelector(el, selector) {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n return isFunction(el[method]);\n });\n }\n\n return el[matchesSelectorFunc].call(el, selector);\n}\n\n/**\n * simple abstraction for dragging events names\n * */\nvar eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n end: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n end: 'mouseup'\n }\n};\n\n// Default to mouse events\nvar dragEventFor = eventsFor.mouse;\n\n/**\n * get {clientX, clientY} positions of control\n * */\nfunction getControlPosition(e) {\n var position = (e.targetTouches && e.targetTouches[0]) || e;\n return {\n clientX: position.clientX,\n clientY: position.clientY\n };\n}\n\nfunction addEvent(el, event, handler) {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n el['on' + event] = handler;\n }\n}\n\nfunction removeEvent(el, event, handler) {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n el['on' + event] = null;\n }\n}\n\nfunction outerHeight(node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n var height = node.clientHeight;\n var computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nfunction outerWidth(node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n var width = node.clientWidth;\n var computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nfunction innerHeight(node) {\n var height = node.clientHeight;\n var computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nfunction innerWidth(node) {\n var width = node.clientWidth;\n var computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\nfunction isNum(num) {\n return typeof num === 'number' && !isNaN(num);\n}\n\nfunction int(a) {\n return parseInt(a, 10);\n}\n\nfunction getBoundPosition(draggable, clientX, clientY) {\n var bounds = JSON.parse(JSON.stringify(draggable.props.bounds));\n var node = draggable.getDOMNode();\n var parent = node.parentNode;\n\n if (bounds === 'parent') {\n var nodeStyle = window.getComputedStyle(node);\n var parentStyle = window.getComputedStyle(parent);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(parentStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(parentStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(parent) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(parent) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) clientX = Math.min(clientX, bounds.right);\n if (isNum(bounds.bottom)) clientY = Math.min(clientY, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) clientX = Math.max(clientX, bounds.left);\n if (isNum(bounds.top)) clientY = Math.max(clientY, bounds.top);\n\n return [clientX, clientY];\n}\n\nfunction snapToGrid(grid, pendingX, pendingY) {\n var x = Math.round(pendingX / grid[0]) * grid[0];\n var y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\n// Useful for preventing blue highlights all over everything when dragging.\nvar userSelectStyle = ';user-select: none;';\nif (browserPrefix) {\n userSelectStyle += '-' + browserPrefix.toLowerCase() + '-user-select: none;';\n}\n\nfunction addUserSelectStyles(draggable) {\n if (!draggable.props.enableUserSelectHack) return;\n var style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nfunction removeUserSelectStyles(draggable) {\n if (!draggable.props.enableUserSelectHack) return;\n var style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nfunction createCSSTransform(style) {\n // Replace unitless items with px\n var x = style.x + 'px';\n var y = style.y + 'px';\n var out = {transform: 'translate(' + x + ',' + y + ')'};\n // Add single prefixed property as well\n if (browserPrefix) {\n out[browserPrefix + 'Transform'] = out.transform;\n }\n return out;\n}\n\n\n//\n// End Helpers.\n//\n\n//\n// Define \n//\n\nmodule.exports = React.createClass({\n displayName: 'Draggable',\n\n propTypes: {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n *\n * Defaults to 'both'.\n */\n axis: React.PropTypes.oneOf(['both', 'x', 'y']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: React.PropTypes.oneOfType([\n React.PropTypes.shape({\n left: React.PropTypes.Number,\n right: React.PropTypes.Number,\n top: React.PropTypes.Number,\n bottom: React.PropTypes.Number\n }),\n React.PropTypes.oneOf(['parent', false])\n ]),\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: React.PropTypes.bool,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * var 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: React.PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * var 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: React.PropTypes.string,\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I snap to a 25 x 25 grid
\n *
\n * );\n * }\n * });\n * ```\n */\n grid: React.PropTypes.arrayOf(React.PropTypes.number),\n\n /**\n * `start` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n start: React.PropTypes.shape({\n x: React.PropTypes.number,\n y: React.PropTypes.number\n }),\n\n /**\n * `moveOnStartChange`, if true (default false) will move the element if the `start`\n * property changes.\n */\n moveOnStartChange: React.PropTypes.bool,\n\n\n /**\n * `zIndex` specifies the zIndex to use while dragging.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I have a zIndex
\n *
\n * );\n * }\n * });\n * ```\n */\n zIndex: React.PropTypes.number,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStart: React.PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onDrag: React.PropTypes.func,\n\n /**\n * Called when dragging stops.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStop: React.PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (due to that there's internal use of onMouseDown)\n */\n onMouseDown: React.PropTypes.func\n },\n\n componentWillReceiveProps: function(newProps) {\n // React to changes in the 'start' param.\n if (newProps.moveOnStartChange && newProps.start) {\n this.setState(this.getInitialState(newProps));\n }\n },\n\n componentWillUnmount: function() {\n // Remove any leftover event handlers\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.end, this.handleDragEnd);\n removeUserSelectStyles(this);\n },\n\n getDefaultProps: function () {\n return {\n axis: 'both',\n bounds: false,\n handle: null,\n cancel: null,\n grid: null,\n moveOnStartChange: false,\n start: {x: 0, y: 0},\n zIndex: NaN,\n enableUserSelectHack: true,\n onStart: emptyFunction,\n onDrag: emptyFunction,\n onStop: emptyFunction,\n onMouseDown: emptyFunction\n };\n },\n\n getInitialState: function (props) {\n // Handle call from CWRP\n props = props || this.props;\n return {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Offset between start top/left and mouse top/left while dragging.\n offsetX: 0, offsetY: 0,\n\n // Current transform x and y.\n clientX: props.start.x, clientY: props.start.y\n };\n },\n\n handleDragStart: function (e) {\n // Set touch identifier in component state if this is a touch event\n if(e.targetTouches){\n this.setState({touchIdentifier: e.targetTouches[0].identifier});\n }\n\n // Make it possible to attach event handlers on top of this one\n this.props.onMouseDown(e);\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match\n if ((this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n (this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n return;\n }\n\n // Call event handler. If it returns explicit false, cancel.\n var shouldStart = this.props.onStart(e, createUIEvent(this));\n if (shouldStart === false) return;\n\n var dragPoint = getControlPosition(e);\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n addUserSelectStyles(this);\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 offsetX: dragPoint.clientX - this.state.clientX,\n offsetY: dragPoint.clientY - this.state.clientY,\n scrollX: document.body.scrollLeft,\n scrollY: document.body.scrollTop\n });\n\n\n // Add event handlers\n addEvent(document, 'scroll', this.handleScroll);\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.end, this.handleDragEnd);\n },\n\n handleDragEnd: function (e) {\n // Short circuit if not currently dragging\n if (!this.state.dragging) {\n return;\n }\n\n // Short circuit if this is not the correct touch event\n if(e.changedTouches && (e.changedTouches[0].identifier != this.state.touchIdentifier)){\n return;\n }\n\n removeUserSelectStyles(this);\n\n // Turn off dragging\n this.setState({\n dragging: false\n });\n\n // Call event handler\n this.props.onStop(e, createUIEvent(this));\n\n // Remove event handlers\n removeEvent(document, 'scroll', this.handleScroll);\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.end, this.handleDragEnd);\n },\n\n handleDrag: function (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)){\n return;\n }\n var dragPoint = getControlPosition(e);\n\n // Calculate X and Y\n var clientX = dragPoint.clientX - this.state.offsetX;\n var clientY = dragPoint.clientY - this.state.offsetY;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n var coords = snapToGrid(this.props.grid, clientX, clientY);\n clientX = coords[0];\n clientY = coords[1];\n }\n\n if (this.props.bounds) {\n var pos = getBoundPosition(this, clientX, clientY);\n clientX = pos[0];\n clientY = pos[1];\n }\n\n // Call event handler. If it returns explicit false, cancel.\n var shouldUpdate = this.props.onDrag(e, createUIEvent(this));\n if (shouldUpdate === false) return this.handleDragEnd({});\n\n // Update transform\n this.setState({\n clientX: clientX,\n clientY: clientY\n });\n },\n\n handleScroll: function(e) {\n var s = this.state, x = document.body.scrollLeft, y = document.body.scrollTop;\n var offsetX = x - s.scrollX, offsetY = y - s.scrollY;\n this.setState({\n scrollX: x,\n scrollY: y,\n clientX: s.clientX + offsetX,\n clientY: s.clientY + offsetY,\n offsetX: s.offsetX - offsetX,\n offsetY: s.offsetY - offsetY\n });\n },\n\n onMouseDown: function(ev) {\n // Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.\n // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.\n // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/\n if (dragEventFor === eventsFor.touch) {\n return ev.preventDefault();\n }\n\n return this.handleDragStart.apply(this, arguments);\n },\n\n onTouchStart: function(ev) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart.apply(this, arguments);\n },\n\n // Intended for use by a parent component. Resets internal state on this component. Useful for\n // and other components in case this element is manually resized and start/moveOnStartChange\n // don't work for you.\n resetState: function() {\n this.setState({\n offsetX: 0, offsetY: 0, clientX: 0, clientY: 0\n });\n },\n\n render: function () {\n // Create style object. We extend from existing styles so we don't\n // remove anything already set (like background, color, etc).\n var childStyle = this.props.children.props.style || {};\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 var transform = createCSSTransform({\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n });\n\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n var touchHacks = {\n touchAction: 'none'\n };\n\n var style = assign({}, childStyle, transform, touchHacks);\n\n // Set zIndex if currently dragging and prop has been provided\n if (this.state.dragging && !isNaN(this.props.zIndex)) {\n style.zIndex = this.props.zIndex;\n }\n\n var 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 React.cloneElement(React.Children.only(this.props.children), {\n style: style,\n className: className,\n\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.handleDragEnd,\n onTouchEnd: this.handleDragEnd\n });\n }\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/draggable.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"React\"\n ** module id = 2\n ** module chunks = 0\n **/","/* eslint-disable no-unused-vars */\n'use strict';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nmodule.exports = Object.assign || function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (Object.getOwnPropertySymbols) {\n\t\t\tsymbols = Object.getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/object-assign/index.js\n **/","/*!\n Copyright (c) 2015 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n(function () {\n\t'use strict';\n\n\tfunction classNames () {\n\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 ('string' === argType || 'number' === argType) {\n\t\t\t\tclasses += ' ' + arg;\n\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\n\t\t\t} else if ('object' === argType) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (arg.hasOwnProperty(key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd){\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(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.exports = function() {\n if (typeof window === 'undefined') return '';\n // Thanks David Walsh\n var styles = window.getComputedStyle(document.documentElement, ''),\n pre = (Array.prototype.slice\n .call(styles)\n .join('')\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])\n )[1];\n // 'ms' is not titlecased\n if (pre === 'ms') return pre;\n return pre.slice(0, 1).toUpperCase() + pre.slice(1);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/getPrefix.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap a6796d2f2639c0473e63",".././index.js",".././lib/draggable.js","../external \"React\"",".././~/object-assign/index.js",".././~/classnames/index.js",".././lib/getPrefix.js"],"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;AAC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KAAK,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;KAEI,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC;OAChC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;SACpB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;SAC5B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;SAC7B,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;SAC3B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;QAC/B,CAAC;OACF,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9C,MAAK,CAAC;AACN;AACA;AACA;AACA;AACA;;AAEA,KAAI,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAI,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAI,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAI,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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G,KAAK,IAAI,EAAE,OAAO,GAAG,CAAC;GAC7B,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;EACrD,CAAC","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\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"React\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {\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 a6796d2f2639c0473e63\n **/","module.exports = require('./lib/draggable');\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","'use strict';\n\nvar React = require('react');\nvar emptyFunction = function(){};\nvar assign = require('object-assign');\nvar classNames = require('classnames');\nvar browserPrefix = require('./getPrefix')();\n\n//\n// Helpers. See Element definition below this section.\n//\n\nfunction createUIEvent(draggable) {\n // State changes are often (but not always!) async. We want the latest value.\n var state = draggable._pendingState || draggable.state;\n return {\n node: draggable.getDOMNode(),\n position: {\n top: state.clientY,\n left: state.clientX\n }\n };\n}\n\nfunction canDragX(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nfunction canDragY(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\nfunction isFunction(func) {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nfunction findInArray(array, callback) {\n for (var i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nvar matchesSelectorFunc = '';\nfunction matchesSelector(el, selector) {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n return isFunction(el[method]);\n });\n }\n\n return el[matchesSelectorFunc].call(el, selector);\n}\n\n/**\n * simple abstraction for dragging events names\n * */\nvar eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n end: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n end: 'mouseup'\n }\n};\n\n// Default to mouse events\nvar dragEventFor = eventsFor.mouse;\n\n/**\n * get {clientX, clientY} positions of control\n * */\nfunction getControlPosition(e) {\n var position = (e.targetTouches && e.targetTouches[0]) || e;\n return {\n clientX: position.clientX,\n clientY: position.clientY\n };\n}\n\nfunction addEvent(el, event, handler) {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n el['on' + event] = handler;\n }\n}\n\nfunction removeEvent(el, event, handler) {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n el['on' + event] = null;\n }\n}\n\nfunction outerHeight(node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n var height = node.clientHeight;\n var computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nfunction outerWidth(node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n var width = node.clientWidth;\n var computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nfunction innerHeight(node) {\n var height = node.clientHeight;\n var computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nfunction innerWidth(node) {\n var width = node.clientWidth;\n var computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\nfunction isNum(num) {\n return typeof num === 'number' && !isNaN(num);\n}\n\nfunction int(a) {\n return parseInt(a, 10);\n}\n\nfunction getBoundPosition(draggable, clientX, clientY) {\n var bounds = JSON.parse(JSON.stringify(draggable.props.bounds));\n var node = draggable.getDOMNode();\n var parent = node.parentNode;\n\n if (bounds === 'parent') {\n var nodeStyle = window.getComputedStyle(node);\n var parentStyle = window.getComputedStyle(parent);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(parentStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(parentStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(parent) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(parent) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) clientX = Math.min(clientX, bounds.right);\n if (isNum(bounds.bottom)) clientY = Math.min(clientY, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) clientX = Math.max(clientX, bounds.left);\n if (isNum(bounds.top)) clientY = Math.max(clientY, bounds.top);\n\n return [clientX, clientY];\n}\n\nfunction snapToGrid(grid, pendingX, pendingY) {\n var x = Math.round(pendingX / grid[0]) * grid[0];\n var y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\n// Useful for preventing blue highlights all over everything when dragging.\nvar userSelectStyle = ';user-select: none;';\nif (browserPrefix) {\n userSelectStyle += '-' + browserPrefix.toLowerCase() + '-user-select: none;';\n}\n\nfunction addUserSelectStyles(draggable) {\n if (!draggable.props.enableUserSelectHack) return;\n var style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nfunction removeUserSelectStyles(draggable) {\n if (!draggable.props.enableUserSelectHack) return;\n var style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nfunction createCSSTransform(style) {\n // Replace unitless items with px\n var x = style.x + 'px';\n var y = style.y + 'px';\n var out = {transform: 'translate(' + x + ',' + y + ')'};\n // Add single prefixed property as well\n if (browserPrefix) {\n out[browserPrefix + 'Transform'] = out.transform;\n }\n return out;\n}\n\nfunction createSVGTransform(args) {\n return 'translate(' + args.x + ',' + args.y + ')';\n}\n\n//\n// End Helpers.\n//\n\n//\n// Define \n//\n\nmodule.exports = React.createClass({\n displayName: 'Draggable',\n\n propTypes: {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n *\n * Defaults to 'both'.\n */\n axis: React.PropTypes.oneOf(['both', 'x', 'y']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: React.PropTypes.oneOfType([\n React.PropTypes.shape({\n left: React.PropTypes.Number,\n right: React.PropTypes.Number,\n top: React.PropTypes.Number,\n bottom: React.PropTypes.Number\n }),\n React.PropTypes.oneOf(['parent', false])\n ]),\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: React.PropTypes.bool,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * var 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: React.PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * var 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: React.PropTypes.string,\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I snap to a 25 x 25 grid
\n *
\n * );\n * }\n * });\n * ```\n */\n grid: React.PropTypes.arrayOf(React.PropTypes.number),\n\n /**\n * `start` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n start: React.PropTypes.shape({\n x: React.PropTypes.number,\n y: React.PropTypes.number\n }),\n\n /**\n * `moveOnStartChange`, if true (default false) will move the element if the `start`\n * property changes.\n */\n moveOnStartChange: React.PropTypes.bool,\n\n\n /**\n * `zIndex` specifies the zIndex to use while dragging.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I have a zIndex
\n *
\n * );\n * }\n * });\n * ```\n */\n zIndex: React.PropTypes.number,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStart: React.PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onDrag: React.PropTypes.func,\n\n /**\n * Called when dragging stops.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStop: React.PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (due to that there's internal use of onMouseDown)\n */\n onMouseDown: React.PropTypes.func,\n },\n\n componentWillReceiveProps: function(newProps) {\n // React to changes in the 'start' param.\n if (newProps.moveOnStartChange && newProps.start) {\n this.setState(this.getInitialState(newProps));\n }\n },\n\n componentDidMount: function() {\n // Check to see if the element passed is an instanceof SVGElement\n if( React.findDOMNode(this) instanceof SVGElement) {\n this.setState({ isElementSVG: true });\n }\n },\n\n componentWillUnmount: function() {\n // Remove any leftover event handlers\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.end, this.handleDragEnd);\n removeUserSelectStyles(this);\n },\n\n getDefaultProps: function () {\n return {\n axis: 'both',\n bounds: false,\n handle: null,\n cancel: null,\n grid: null,\n moveOnStartChange: false,\n start: {x: 0, y: 0},\n zIndex: NaN,\n enableUserSelectHack: true,\n onStart: emptyFunction,\n onDrag: emptyFunction,\n onStop: emptyFunction,\n onMouseDown: emptyFunction,\n };\n },\n\n getInitialState: function (props) {\n // Handle call from CWRP\n props = props || this.props;\n return {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Offset between start top/left and mouse top/left while dragging.\n offsetX: 0, offsetY: 0,\n\n // Current transform x and y.\n clientX: props.start.x, clientY: props.start.y,\n\n // Can only determine if is SVG after mounted\n isElementSVG: false\n\n };\n },\n\n handleDragStart: function (e) {\n // Set touch identifier in component state if this is a touch event\n if(e.targetTouches){\n this.setState({touchIdentifier: e.targetTouches[0].identifier});\n }\n\n // Make it possible to attach event handlers on top of this one\n this.props.onMouseDown(e);\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match\n if ((this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n (this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n return;\n }\n\n // Call event handler. If it returns explicit false, cancel.\n var shouldStart = this.props.onStart(e, createUIEvent(this));\n if (shouldStart === false) return;\n\n var dragPoint = getControlPosition(e);\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n addUserSelectStyles(this);\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 offsetX: dragPoint.clientX - this.state.clientX,\n offsetY: dragPoint.clientY - this.state.clientY,\n scrollX: document.body.scrollLeft,\n scrollY: document.body.scrollTop\n });\n\n\n // Add event handlers\n addEvent(document, 'scroll', this.handleScroll);\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.end, this.handleDragEnd);\n },\n\n handleDragEnd: function (e) {\n // Short circuit if not currently dragging\n if (!this.state.dragging) {\n return;\n }\n\n // Short circuit if this is not the correct touch event\n if(e.changedTouches && (e.changedTouches[0].identifier != this.state.touchIdentifier)){\n return;\n }\n\n removeUserSelectStyles(this);\n\n // Turn off dragging\n this.setState({\n dragging: false\n });\n\n // Call event handler\n this.props.onStop(e, createUIEvent(this));\n\n // Remove event handlers\n removeEvent(document, 'scroll', this.handleScroll);\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.end, this.handleDragEnd);\n },\n\n handleDrag: function (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)){\n return;\n }\n var dragPoint = getControlPosition(e);\n\n // Calculate X and Y\n var clientX = dragPoint.clientX - this.state.offsetX;\n var clientY = dragPoint.clientY - this.state.offsetY;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n var coords = snapToGrid(this.props.grid, clientX, clientY);\n clientX = coords[0];\n clientY = coords[1];\n }\n\n if (this.props.bounds) {\n var pos = getBoundPosition(this, clientX, clientY);\n clientX = pos[0];\n clientY = pos[1];\n }\n\n // Call event handler. If it returns explicit false, cancel.\n var shouldUpdate = this.props.onDrag(e, createUIEvent(this));\n if (shouldUpdate === false) return this.handleDragEnd({});\n\n // Update transform\n this.setState({\n clientX: clientX,\n clientY: clientY\n });\n },\n\n handleScroll: function(e) {\n var s = this.state, x = document.body.scrollLeft, y = document.body.scrollTop;\n var offsetX = x - s.scrollX, offsetY = y - s.scrollY;\n this.setState({\n scrollX: x,\n scrollY: y,\n clientX: s.clientX + offsetX,\n clientY: s.clientY + offsetY,\n offsetX: s.offsetX - offsetX,\n offsetY: s.offsetY - offsetY\n });\n },\n\n onMouseDown: function(ev) {\n // Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.\n // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.\n // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/\n if (dragEventFor === eventsFor.touch) {\n return ev.preventDefault();\n }\n\n return this.handleDragStart.apply(this, arguments);\n },\n\n onTouchStart: function(ev) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart.apply(this, arguments);\n },\n\n // Intended for use by a parent component. Resets internal state on this component. Useful for\n // and other components in case this element is manually resized and start/moveOnStartChange\n // don't work for you.\n resetState: function() {\n this.setState({\n offsetX: 0, offsetY: 0, clientX: 0, clientY: 0\n });\n },\n\n render: function () {\n // Create style object. We extend from existing styles so we don't\n // remove anything already set (like background, color, etc).\n var childStyle = this.props.children.props.style || {};\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 var transform = this.state.isElementSVG ? null :\n createCSSTransform({\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n });\n\n\n var svgTransform = !this.state.isElementSVG ? null :\n createSVGTransform({\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n });\n\n\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n var touchHacks = {\n touchAction: 'none'\n };\n\n var style = assign({}, childStyle, transform, touchHacks);\n\n // Set zIndex if currently dragging and prop has been provided\n if (this.state.dragging && !isNaN(this.props.zIndex)) {\n style.zIndex = this.props.zIndex;\n }\n\n var 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 React.cloneElement(React.Children.only(this.props.children), {\n style: style,\n transform: svgTransform,\n className: className,\n\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.handleDragEnd,\n onTouchEnd: this.handleDragEnd\n });\n }\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/draggable.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"React\"\n ** module id = 2\n ** module chunks = 0\n **/","/* eslint-disable no-unused-vars */\n'use strict';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nmodule.exports = Object.assign || function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (Object.getOwnPropertySymbols) {\n\t\t\tsymbols = Object.getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/object-assign/index.js\n **/","/*!\n Copyright (c) 2015 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n(function () {\n\t'use strict';\n\n\tfunction classNames () {\n\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 ('string' === argType || 'number' === argType) {\n\t\t\t\tclasses += ' ' + arg;\n\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\n\t\t\t} else if ('object' === argType) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (arg.hasOwnProperty(key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd){\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(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.exports = function() {\n if (typeof window === 'undefined') return '';\n // Thanks David Walsh\n var styles = window.getComputedStyle(document.documentElement, ''),\n pre = (Array.prototype.slice\n .call(styles)\n .join('')\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])\n )[1];\n // 'ms' is not titlecased\n if (pre === 'ms') return pre;\n return pre.slice(0, 1).toUpperCase() + pre.slice(1);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/getPrefix.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/react-draggable.min.js b/dist/react-draggable.min.js index 0a64a682..45f3b1f9 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")):"function"==typeof define&&define.amd?define(["React"],factory):"object"==typeof exports?exports.ReactDraggable=factory(require("React")):root.ReactDraggable=factory(root.React)}(this,function(__WEBPACK_EXTERNAL_MODULE_2__){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__){module.exports=__webpack_require__(1)},function(module,exports,__webpack_require__){"use strict";function createUIEvent(draggable){var state=draggable._pendingState||draggable.state;return{node:draggable.getDOMNode(),position:{top:state.clientY,left:state.clientX}}}function canDragX(draggable){return"both"===draggable.props.axis||"x"===draggable.props.axis}function canDragY(draggable){return"both"===draggable.props.axis||"y"===draggable.props.axis}function isFunction(func){return"function"==typeof func||"[object Function]"===Object.prototype.toString.call(func)}function findInArray(array,callback){for(var i=0,length=array.length;length>i;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]}function matchesSelector(el,selector){return matchesSelectorFunc||(matchesSelectorFunc=findInArray(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(method){return isFunction(el[method])})),el[matchesSelectorFunc].call(el,selector)}function getControlPosition(e){var position=e.targetTouches&&e.targetTouches[0]||e;return{clientX:position.clientX,clientY:position.clientY}}function addEvent(el,event,handler){el&&(el.attachEvent?el.attachEvent("on"+event,handler):el.addEventListener?el.addEventListener(event,handler,!0):el["on"+event]=handler)}function removeEvent(el,event,handler){el&&(el.detachEvent?el.detachEvent("on"+event,handler):el.removeEventListener?el.removeEventListener(event,handler,!0):el["on"+event]=null)}function outerHeight(node){var height=node.clientHeight,computedStyle=window.getComputedStyle(node);return height+=int(computedStyle.borderTopWidth),height+=int(computedStyle.borderBottomWidth)}function outerWidth(node){var width=node.clientWidth,computedStyle=window.getComputedStyle(node);return width+=int(computedStyle.borderLeftWidth),width+=int(computedStyle.borderRightWidth)}function innerHeight(node){var height=node.clientHeight,computedStyle=window.getComputedStyle(node);return height-=int(computedStyle.paddingTop),height-=int(computedStyle.paddingBottom)}function innerWidth(node){var width=node.clientWidth,computedStyle=window.getComputedStyle(node);return width-=int(computedStyle.paddingLeft),width-=int(computedStyle.paddingRight)}function isNum(num){return"number"==typeof num&&!isNaN(num)}function int(a){return parseInt(a,10)}function getBoundPosition(draggable,clientX,clientY){var bounds=JSON.parse(JSON.stringify(draggable.props.bounds)),node=draggable.getDOMNode(),parent=node.parentNode;if("parent"===bounds){var nodeStyle=window.getComputedStyle(node),parentStyle=window.getComputedStyle(parent);bounds={left:-node.offsetLeft+int(parentStyle.paddingLeft)+int(nodeStyle.borderLeftWidth)+int(nodeStyle.marginLeft),top:-node.offsetTop+int(parentStyle.paddingTop)+int(nodeStyle.borderTopWidth)+int(nodeStyle.marginTop),right:innerWidth(parent)-outerWidth(node)-node.offsetLeft,bottom:innerHeight(parent)-outerHeight(node)-node.offsetTop}}return isNum(bounds.right)&&(clientX=Math.min(clientX,bounds.right)),isNum(bounds.bottom)&&(clientY=Math.min(clientY,bounds.bottom)),isNum(bounds.left)&&(clientX=Math.max(clientX,bounds.left)),isNum(bounds.top)&&(clientY=Math.max(clientY,bounds.top)),[clientX,clientY]}function snapToGrid(grid,pendingX,pendingY){var x=Math.round(pendingX/grid[0])*grid[0],y=Math.round(pendingY/grid[1])*grid[1];return[x,y]}function addUserSelectStyles(draggable){if(draggable.props.enableUserSelectHack){var style=document.body.getAttribute("style")||"";document.body.setAttribute("style",style+userSelectStyle)}}function removeUserSelectStyles(draggable){if(draggable.props.enableUserSelectHack){var style=document.body.getAttribute("style")||"";document.body.setAttribute("style",style.replace(userSelectStyle,""))}}function createCSSTransform(style){var x=style.x+"px",y=style.y+"px",out={transform:"translate("+x+","+y+")"};return browserPrefix&&(out[browserPrefix+"Transform"]=out.transform),out}var React=__webpack_require__(2),emptyFunction=function(){},assign=__webpack_require__(3),classNames=__webpack_require__(4),browserPrefix=__webpack_require__(5)(),matchesSelectorFunc="",eventsFor={touch:{start:"touchstart",move:"touchmove",end:"touchend"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"}},dragEventFor=eventsFor.mouse,userSelectStyle=";user-select: none;";browserPrefix&&(userSelectStyle+="-"+browserPrefix.toLowerCase()+"-user-select: none;"),module.exports=React.createClass({displayName:"Draggable",propTypes:{axis:React.PropTypes.oneOf(["both","x","y"]),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.oneOf(["parent",!1])]),enableUserSelectHack:React.PropTypes.bool,handle:React.PropTypes.string,cancel:React.PropTypes.string,grid:React.PropTypes.arrayOf(React.PropTypes.number),start:React.PropTypes.shape({x:React.PropTypes.number,y:React.PropTypes.number}),moveOnStartChange:React.PropTypes.bool,zIndex:React.PropTypes.number,onStart:React.PropTypes.func,onDrag:React.PropTypes.func,onStop:React.PropTypes.func,onMouseDown:React.PropTypes.func},componentWillReceiveProps:function(newProps){newProps.moveOnStartChange&&newProps.start&&this.setState(this.getInitialState(newProps))},componentWillUnmount:function(){removeEvent(document,dragEventFor.move,this.handleDrag),removeEvent(document,dragEventFor.end,this.handleDragEnd),removeUserSelectStyles(this)},getDefaultProps:function(){return{axis:"both",bounds:!1,handle:null,cancel:null,grid:null,moveOnStartChange:!1,start:{x:0,y:0},zIndex:NaN,enableUserSelectHack:!0,onStart:emptyFunction,onDrag:emptyFunction,onStop:emptyFunction,onMouseDown:emptyFunction}},getInitialState:function(props){return props=props||this.props,{dragging:!1,offsetX:0,offsetY:0,clientX:props.start.x,clientY:props.start.y}},handleDragStart:function(e){if(e.targetTouches&&this.setState({touchIdentifier:e.targetTouches[0].identifier}),this.props.onMouseDown(e),!(this.props.handle&&!matchesSelector(e.target,this.props.handle)||this.props.cancel&&matchesSelector(e.target,this.props.cancel))){var shouldStart=this.props.onStart(e,createUIEvent(this));if(shouldStart!==!1){var dragPoint=getControlPosition(e);addUserSelectStyles(this),this.setState({dragging:!0,offsetX:dragPoint.clientX-this.state.clientX,offsetY:dragPoint.clientY-this.state.clientY,scrollX:document.body.scrollLeft,scrollY:document.body.scrollTop}),addEvent(document,"scroll",this.handleScroll),addEvent(document,dragEventFor.move,this.handleDrag),addEvent(document,dragEventFor.end,this.handleDragEnd)}}},handleDragEnd:function(e){this.state.dragging&&(e.changedTouches&&e.changedTouches[0].identifier!=this.state.touchIdentifier||(removeUserSelectStyles(this),this.setState({dragging:!1}),this.props.onStop(e,createUIEvent(this)),removeEvent(document,"scroll",this.handleScroll),removeEvent(document,dragEventFor.move,this.handleDrag),removeEvent(document,dragEventFor.end,this.handleDragEnd)))},handleDrag:function(e){if(!e.targetTouches||e.targetTouches[0].identifier==this.state.touchIdentifier){var dragPoint=getControlPosition(e),clientX=dragPoint.clientX-this.state.offsetX,clientY=dragPoint.clientY-this.state.offsetY;if(Array.isArray(this.props.grid)){var coords=snapToGrid(this.props.grid,clientX,clientY);clientX=coords[0],clientY=coords[1]}if(this.props.bounds){var pos=getBoundPosition(this,clientX,clientY);clientX=pos[0],clientY=pos[1]}var shouldUpdate=this.props.onDrag(e,createUIEvent(this));return shouldUpdate===!1?this.handleDragEnd({}):void this.setState({clientX:clientX,clientY:clientY})}},handleScroll:function(e){var s=this.state,x=document.body.scrollLeft,y=document.body.scrollTop,offsetX=x-s.scrollX,offsetY=y-s.scrollY;this.setState({scrollX:x,scrollY:y,clientX:s.clientX+offsetX,clientY:s.clientY+offsetY,offsetX:s.offsetX-offsetX,offsetY:s.offsetY-offsetY})},onMouseDown:function(ev){return dragEventFor===eventsFor.touch?ev.preventDefault():this.handleDragStart.apply(this,arguments)},onTouchStart:function(ev){return dragEventFor=eventsFor.touch,this.handleDragStart.apply(this,arguments)},resetState:function(){this.setState({offsetX:0,offsetY:0,clientX:0,clientY:0})},render:function(){var childStyle=this.props.children.props.style||{},transform=createCSSTransform({x:canDragX(this)?this.state.clientX:this.props.start.x,y:canDragY(this)?this.state.clientY:this.props.start.y}),touchHacks={touchAction:"none"},style=assign({},childStyle,transform,touchHacks);this.state.dragging&&!isNaN(this.props.zIndex)&&(style.zIndex=this.props.zIndex);var className=classNames(this.props.children.props.className||"","react-draggable",{"react-draggable-dragging":this.state.dragging,"react-draggable-dragged":this.state.dragged});return React.cloneElement(React.Children.only(this.props.children),{style:style,className:className,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.handleDragEnd,onTouchEnd:this.handleDragEnd})}})},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},function(module,exports){"use strict";function toObject(val){if(null===val||void 0===val)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(val)}var hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=Object.assign||function(target,source){for(var from,symbols,to=toObject(target),s=1;si;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]}function matchesSelector(el,selector){return matchesSelectorFunc||(matchesSelectorFunc=findInArray(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(method){return isFunction(el[method])})),el[matchesSelectorFunc].call(el,selector)}function getControlPosition(e){var position=e.targetTouches&&e.targetTouches[0]||e;return{clientX:position.clientX,clientY:position.clientY}}function addEvent(el,event,handler){el&&(el.attachEvent?el.attachEvent("on"+event,handler):el.addEventListener?el.addEventListener(event,handler,!0):el["on"+event]=handler)}function removeEvent(el,event,handler){el&&(el.detachEvent?el.detachEvent("on"+event,handler):el.removeEventListener?el.removeEventListener(event,handler,!0):el["on"+event]=null)}function outerHeight(node){var height=node.clientHeight,computedStyle=window.getComputedStyle(node);return height+=int(computedStyle.borderTopWidth),height+=int(computedStyle.borderBottomWidth)}function outerWidth(node){var width=node.clientWidth,computedStyle=window.getComputedStyle(node);return width+=int(computedStyle.borderLeftWidth),width+=int(computedStyle.borderRightWidth)}function innerHeight(node){var height=node.clientHeight,computedStyle=window.getComputedStyle(node);return height-=int(computedStyle.paddingTop),height-=int(computedStyle.paddingBottom)}function innerWidth(node){var width=node.clientWidth,computedStyle=window.getComputedStyle(node);return width-=int(computedStyle.paddingLeft),width-=int(computedStyle.paddingRight)}function isNum(num){return"number"==typeof num&&!isNaN(num)}function int(a){return parseInt(a,10)}function getBoundPosition(draggable,clientX,clientY){var bounds=JSON.parse(JSON.stringify(draggable.props.bounds)),node=draggable.getDOMNode(),parent=node.parentNode;if("parent"===bounds){var nodeStyle=window.getComputedStyle(node),parentStyle=window.getComputedStyle(parent);bounds={left:-node.offsetLeft+int(parentStyle.paddingLeft)+int(nodeStyle.borderLeftWidth)+int(nodeStyle.marginLeft),top:-node.offsetTop+int(parentStyle.paddingTop)+int(nodeStyle.borderTopWidth)+int(nodeStyle.marginTop),right:innerWidth(parent)-outerWidth(node)-node.offsetLeft,bottom:innerHeight(parent)-outerHeight(node)-node.offsetTop}}return isNum(bounds.right)&&(clientX=Math.min(clientX,bounds.right)),isNum(bounds.bottom)&&(clientY=Math.min(clientY,bounds.bottom)),isNum(bounds.left)&&(clientX=Math.max(clientX,bounds.left)),isNum(bounds.top)&&(clientY=Math.max(clientY,bounds.top)),[clientX,clientY]}function snapToGrid(grid,pendingX,pendingY){var x=Math.round(pendingX/grid[0])*grid[0],y=Math.round(pendingY/grid[1])*grid[1];return[x,y]}function addUserSelectStyles(draggable){if(draggable.props.enableUserSelectHack){var style=document.body.getAttribute("style")||"";document.body.setAttribute("style",style+userSelectStyle)}}function removeUserSelectStyles(draggable){if(draggable.props.enableUserSelectHack){var style=document.body.getAttribute("style")||"";document.body.setAttribute("style",style.replace(userSelectStyle,""))}}function createCSSTransform(style){var x=style.x+"px",y=style.y+"px",out={transform:"translate("+x+","+y+")"};return browserPrefix&&(out[browserPrefix+"Transform"]=out.transform),out}function createSVGTransform(args){return"translate("+args.x+","+args.y+")"}var React=__webpack_require__(2),emptyFunction=function(){},assign=__webpack_require__(3),classNames=__webpack_require__(4),browserPrefix=__webpack_require__(5)(),matchesSelectorFunc="",eventsFor={touch:{start:"touchstart",move:"touchmove",end:"touchend"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"}},dragEventFor=eventsFor.mouse,userSelectStyle=";user-select: none;";browserPrefix&&(userSelectStyle+="-"+browserPrefix.toLowerCase()+"-user-select: none;"),module.exports=React.createClass({displayName:"Draggable",propTypes:{axis:React.PropTypes.oneOf(["both","x","y"]),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.oneOf(["parent",!1])]),enableUserSelectHack:React.PropTypes.bool,handle:React.PropTypes.string,cancel:React.PropTypes.string,grid:React.PropTypes.arrayOf(React.PropTypes.number),start:React.PropTypes.shape({x:React.PropTypes.number,y:React.PropTypes.number}),moveOnStartChange:React.PropTypes.bool,zIndex:React.PropTypes.number,onStart:React.PropTypes.func,onDrag:React.PropTypes.func,onStop:React.PropTypes.func,onMouseDown:React.PropTypes.func},componentWillReceiveProps:function(newProps){newProps.moveOnStartChange&&newProps.start&&this.setState(this.getInitialState(newProps))},componentDidMount:function(){React.findDOMNode(this)instanceof SVGElement&&this.setState({isElementSVG:!0})},componentWillUnmount:function(){removeEvent(document,dragEventFor.move,this.handleDrag),removeEvent(document,dragEventFor.end,this.handleDragEnd),removeUserSelectStyles(this)},getDefaultProps:function(){return{axis:"both",bounds:!1,handle:null,cancel:null,grid:null,moveOnStartChange:!1,start:{x:0,y:0},zIndex:NaN,enableUserSelectHack:!0,onStart:emptyFunction,onDrag:emptyFunction,onStop:emptyFunction,onMouseDown:emptyFunction}},getInitialState:function(props){return props=props||this.props,{dragging:!1,offsetX:0,offsetY:0,clientX:props.start.x,clientY:props.start.y,isElementSVG:!1}},handleDragStart:function(e){if(e.targetTouches&&this.setState({touchIdentifier:e.targetTouches[0].identifier}),this.props.onMouseDown(e),!(this.props.handle&&!matchesSelector(e.target,this.props.handle)||this.props.cancel&&matchesSelector(e.target,this.props.cancel))){var shouldStart=this.props.onStart(e,createUIEvent(this));if(shouldStart!==!1){var dragPoint=getControlPosition(e);addUserSelectStyles(this),this.setState({dragging:!0,offsetX:dragPoint.clientX-this.state.clientX,offsetY:dragPoint.clientY-this.state.clientY,scrollX:document.body.scrollLeft,scrollY:document.body.scrollTop}),addEvent(document,"scroll",this.handleScroll),addEvent(document,dragEventFor.move,this.handleDrag),addEvent(document,dragEventFor.end,this.handleDragEnd)}}},handleDragEnd:function(e){this.state.dragging&&(e.changedTouches&&e.changedTouches[0].identifier!=this.state.touchIdentifier||(removeUserSelectStyles(this),this.setState({dragging:!1}),this.props.onStop(e,createUIEvent(this)),removeEvent(document,"scroll",this.handleScroll),removeEvent(document,dragEventFor.move,this.handleDrag),removeEvent(document,dragEventFor.end,this.handleDragEnd)))},handleDrag:function(e){if(!e.targetTouches||e.targetTouches[0].identifier==this.state.touchIdentifier){var dragPoint=getControlPosition(e),clientX=dragPoint.clientX-this.state.offsetX,clientY=dragPoint.clientY-this.state.offsetY;if(Array.isArray(this.props.grid)){var coords=snapToGrid(this.props.grid,clientX,clientY);clientX=coords[0],clientY=coords[1]}if(this.props.bounds){var pos=getBoundPosition(this,clientX,clientY);clientX=pos[0],clientY=pos[1]}var shouldUpdate=this.props.onDrag(e,createUIEvent(this));return shouldUpdate===!1?this.handleDragEnd({}):void this.setState({clientX:clientX,clientY:clientY})}},handleScroll:function(e){var s=this.state,x=document.body.scrollLeft,y=document.body.scrollTop,offsetX=x-s.scrollX,offsetY=y-s.scrollY;this.setState({scrollX:x,scrollY:y,clientX:s.clientX+offsetX,clientY:s.clientY+offsetY,offsetX:s.offsetX-offsetX,offsetY:s.offsetY-offsetY})},onMouseDown:function(ev){return dragEventFor===eventsFor.touch?ev.preventDefault():this.handleDragStart.apply(this,arguments)},onTouchStart:function(ev){return dragEventFor=eventsFor.touch,this.handleDragStart.apply(this,arguments)},resetState:function(){this.setState({offsetX:0,offsetY:0,clientX:0,clientY:0})},render:function(){var childStyle=this.props.children.props.style||{},transform=this.state.isElementSVG?null:createCSSTransform({x:canDragX(this)?this.state.clientX:this.props.start.x,y:canDragY(this)?this.state.clientY:this.props.start.y}),svgTransform=this.state.isElementSVG?createSVGTransform({x:canDragX(this)?this.state.clientX:this.props.start.x,y:canDragY(this)?this.state.clientY:this.props.start.y}):null,touchHacks={touchAction:"none"},style=assign({},childStyle,transform,touchHacks);this.state.dragging&&!isNaN(this.props.zIndex)&&(style.zIndex=this.props.zIndex);var className=classNames(this.props.children.props.className||"","react-draggable",{"react-draggable-dragging":this.state.dragging,"react-draggable-dragged":this.state.dragged});return React.cloneElement(React.Children.only(this.props.children),{style:style,transform:svgTransform,className:className,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.handleDragEnd,onTouchEnd:this.handleDragEnd})}})},function(module,exports){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},function(module,exports){"use strict";function toObject(val){if(null===val||void 0===val)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(val)}var hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;module.exports=Object.assign||function(target,source){for(var from,symbols,to=toObject(target),s=1;s\n//\n\nmodule.exports = React.createClass({\n displayName: 'Draggable',\n\n propTypes: {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n *\n * Defaults to 'both'.\n */\n axis: React.PropTypes.oneOf(['both', 'x', 'y']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: React.PropTypes.oneOfType([\n React.PropTypes.shape({\n left: React.PropTypes.Number,\n right: React.PropTypes.Number,\n top: React.PropTypes.Number,\n bottom: React.PropTypes.Number\n }),\n React.PropTypes.oneOf(['parent', false])\n ]),\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: React.PropTypes.bool,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * var 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: React.PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * var 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: React.PropTypes.string,\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I snap to a 25 x 25 grid
\n *
\n * );\n * }\n * });\n * ```\n */\n grid: React.PropTypes.arrayOf(React.PropTypes.number),\n\n /**\n * `start` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n start: React.PropTypes.shape({\n x: React.PropTypes.number,\n y: React.PropTypes.number\n }),\n\n /**\n * `moveOnStartChange`, if true (default false) will move the element if the `start`\n * property changes.\n */\n moveOnStartChange: React.PropTypes.bool,\n\n\n /**\n * `zIndex` specifies the zIndex to use while dragging.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I have a zIndex
\n *
\n * );\n * }\n * });\n * ```\n */\n zIndex: React.PropTypes.number,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStart: React.PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onDrag: React.PropTypes.func,\n\n /**\n * Called when dragging stops.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStop: React.PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (due to that there's internal use of onMouseDown)\n */\n onMouseDown: React.PropTypes.func\n },\n\n componentWillReceiveProps: function(newProps) {\n // React to changes in the 'start' param.\n if (newProps.moveOnStartChange && newProps.start) {\n this.setState(this.getInitialState(newProps));\n }\n },\n\n componentWillUnmount: function() {\n // Remove any leftover event handlers\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.end, this.handleDragEnd);\n removeUserSelectStyles(this);\n },\n\n getDefaultProps: function () {\n return {\n axis: 'both',\n bounds: false,\n handle: null,\n cancel: null,\n grid: null,\n moveOnStartChange: false,\n start: {x: 0, y: 0},\n zIndex: NaN,\n enableUserSelectHack: true,\n onStart: emptyFunction,\n onDrag: emptyFunction,\n onStop: emptyFunction,\n onMouseDown: emptyFunction\n };\n },\n\n getInitialState: function (props) {\n // Handle call from CWRP\n props = props || this.props;\n return {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Offset between start top/left and mouse top/left while dragging.\n offsetX: 0, offsetY: 0,\n\n // Current transform x and y.\n clientX: props.start.x, clientY: props.start.y\n };\n },\n\n handleDragStart: function (e) {\n // Set touch identifier in component state if this is a touch event\n if(e.targetTouches){\n this.setState({touchIdentifier: e.targetTouches[0].identifier});\n }\n\n // Make it possible to attach event handlers on top of this one\n this.props.onMouseDown(e);\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match\n if ((this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n (this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n return;\n }\n\n // Call event handler. If it returns explicit false, cancel.\n var shouldStart = this.props.onStart(e, createUIEvent(this));\n if (shouldStart === false) return;\n\n var dragPoint = getControlPosition(e);\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n addUserSelectStyles(this);\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 offsetX: dragPoint.clientX - this.state.clientX,\n offsetY: dragPoint.clientY - this.state.clientY,\n scrollX: document.body.scrollLeft,\n scrollY: document.body.scrollTop\n });\n\n\n // Add event handlers\n addEvent(document, 'scroll', this.handleScroll);\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.end, this.handleDragEnd);\n },\n\n handleDragEnd: function (e) {\n // Short circuit if not currently dragging\n if (!this.state.dragging) {\n return;\n }\n\n // Short circuit if this is not the correct touch event\n if(e.changedTouches && (e.changedTouches[0].identifier != this.state.touchIdentifier)){\n return;\n }\n\n removeUserSelectStyles(this);\n\n // Turn off dragging\n this.setState({\n dragging: false\n });\n\n // Call event handler\n this.props.onStop(e, createUIEvent(this));\n\n // Remove event handlers\n removeEvent(document, 'scroll', this.handleScroll);\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.end, this.handleDragEnd);\n },\n\n handleDrag: function (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)){\n return;\n }\n var dragPoint = getControlPosition(e);\n\n // Calculate X and Y\n var clientX = dragPoint.clientX - this.state.offsetX;\n var clientY = dragPoint.clientY - this.state.offsetY;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n var coords = snapToGrid(this.props.grid, clientX, clientY);\n clientX = coords[0];\n clientY = coords[1];\n }\n\n if (this.props.bounds) {\n var pos = getBoundPosition(this, clientX, clientY);\n clientX = pos[0];\n clientY = pos[1];\n }\n\n // Call event handler. If it returns explicit false, cancel.\n var shouldUpdate = this.props.onDrag(e, createUIEvent(this));\n if (shouldUpdate === false) return this.handleDragEnd({});\n\n // Update transform\n this.setState({\n clientX: clientX,\n clientY: clientY\n });\n },\n\n handleScroll: function(e) {\n var s = this.state, x = document.body.scrollLeft, y = document.body.scrollTop;\n var offsetX = x - s.scrollX, offsetY = y - s.scrollY;\n this.setState({\n scrollX: x,\n scrollY: y,\n clientX: s.clientX + offsetX,\n clientY: s.clientY + offsetY,\n offsetX: s.offsetX - offsetX,\n offsetY: s.offsetY - offsetY\n });\n },\n\n onMouseDown: function(ev) {\n // Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.\n // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.\n // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/\n if (dragEventFor === eventsFor.touch) {\n return ev.preventDefault();\n }\n\n return this.handleDragStart.apply(this, arguments);\n },\n\n onTouchStart: function(ev) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart.apply(this, arguments);\n },\n\n // Intended for use by a parent component. Resets internal state on this component. Useful for\n // and other components in case this element is manually resized and start/moveOnStartChange\n // don't work for you.\n resetState: function() {\n this.setState({\n offsetX: 0, offsetY: 0, clientX: 0, clientY: 0\n });\n },\n\n render: function () {\n // Create style object. We extend from existing styles so we don't\n // remove anything already set (like background, color, etc).\n var childStyle = this.props.children.props.style || {};\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 var transform = createCSSTransform({\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n });\n\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n var touchHacks = {\n touchAction: 'none'\n };\n\n var style = assign({}, childStyle, transform, touchHacks);\n\n // Set zIndex if currently dragging and prop has been provided\n if (this.state.dragging && !isNaN(this.props.zIndex)) {\n style.zIndex = this.props.zIndex;\n }\n\n var 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 React.cloneElement(React.Children.only(this.props.children), {\n style: style,\n className: className,\n\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.handleDragEnd,\n onTouchEnd: this.handleDragEnd\n });\n }\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/draggable.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"React\"\n ** module id = 2\n ** module chunks = 0\n **/","/* eslint-disable no-unused-vars */\n'use strict';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nmodule.exports = Object.assign || function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (Object.getOwnPropertySymbols) {\n\t\t\tsymbols = Object.getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/object-assign/index.js\n **/","/*!\n Copyright (c) 2015 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n(function () {\n\t'use strict';\n\n\tfunction classNames () {\n\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 ('string' === argType || 'number' === argType) {\n\t\t\t\tclasses += ' ' + arg;\n\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\n\t\t\t} else if ('object' === argType) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (arg.hasOwnProperty(key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd){\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(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.exports = function() {\n if (typeof window === 'undefined') return '';\n // Thanks David Walsh\n var styles = window.getComputedStyle(document.documentElement, ''),\n pre = (Array.prototype.slice\n .call(styles)\n .join('')\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])\n )[1];\n // 'ms' is not titlecased\n if (pre === 'ms') return pre;\n return pre.slice(0, 1).toUpperCase() + pre.slice(1);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/getPrefix.js\n **/"]} \ No newline at end of file +{"version":3,"file":"./dist/react-draggable.js","sources":["../webpack/universalModuleDefinition","../webpack/bootstrap a6796d2f2639c0473e63",".././index.js",".././lib/draggable.js","../external \"React\"",".././~/object-assign/index.js",".././~/classnames/index.js",".././lib/getPrefix.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","__webpack_require__","moduleId","installedModules","id","loaded","modules","call","m","c","p","createUIEvent","draggable","state","_pendingState","node","getDOMNode","position","top","clientY","left","clientX","canDragX","props","axis","canDragY","isFunction","func","Object","prototype","toString","findInArray","array","callback","i","length","apply","matchesSelector","el","selector","matchesSelectorFunc","method","getControlPosition","e","targetTouches","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","outerHeight","height","clientHeight","computedStyle","window","getComputedStyle","int","borderTopWidth","borderBottomWidth","outerWidth","width","clientWidth","borderLeftWidth","borderRightWidth","innerHeight","paddingTop","paddingBottom","innerWidth","paddingLeft","paddingRight","isNum","num","isNaN","a","parseInt","getBoundPosition","bounds","JSON","parse","stringify","parent","parentNode","nodeStyle","parentStyle","offsetLeft","marginLeft","offsetTop","marginTop","right","bottom","Math","min","max","snapToGrid","grid","pendingX","pendingY","x","round","y","addUserSelectStyles","enableUserSelectHack","style","document","body","getAttribute","setAttribute","userSelectStyle","removeUserSelectStyles","replace","createCSSTransform","out","transform","browserPrefix","createSVGTransform","args","React","emptyFunction","assign","classNames","eventsFor","touch","start","move","end","mouse","dragEventFor","toLowerCase","createClass","displayName","propTypes","PropTypes","oneOf","oneOfType","shape","Number","bool","handle","string","cancel","arrayOf","number","moveOnStartChange","zIndex","onStart","onDrag","onStop","onMouseDown","componentWillReceiveProps","newProps","setState","getInitialState","componentDidMount","findDOMNode","SVGElement","isElementSVG","componentWillUnmount","handleDrag","handleDragEnd","getDefaultProps","NaN","dragging","offsetX","offsetY","handleDragStart","touchIdentifier","identifier","target","shouldStart","dragPoint","scrollX","scrollLeft","scrollY","scrollTop","handleScroll","changedTouches","Array","isArray","coords","pos","shouldUpdate","s","ev","preventDefault","arguments","onTouchStart","resetState","render","childStyle","children","svgTransform","touchHacks","touchAction","className","react-draggable-dragging","react-draggable-dragged","dragged","cloneElement","Children","only","onMouseUp","onTouchEnd","toObject","val","undefined","TypeError","hasOwnProperty","propIsEnumerable","propertyIsEnumerable","source","from","symbols","to","key","getOwnPropertySymbols","__WEBPACK_AMD_DEFINE_RESULT__","classes","arg","argType","substr","styles","documentElement","pre","slice","join","match","OLink","toUpperCase"],"mappings":"AAAA,CAAA,SAAAA,KAAAC,SACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,QAAAG,QAAA,UACA,kBAAAC,SAAAA,OAAAC,IACAD,QAAA,SAAAJ,SACA,gBAAAC,SACAA,QAAA,eAAAD,QAAAG,QAAA,UAEAJ,KAAA,eAAAC,QAAAD,KAAA,QACCO,KAAA,SAAAC,+BACD,yBCNA,QAAAC,qBAAAC,UAGA,GAAAC,iBAAAD,UACA,MAAAC,kBAAAD,UAAAR,OAGA,IAAAC,QAAAQ,iBAAAD,WACAR,WACAU,GAAAF,SACAG,QAAA,EAUA,OANAC,SAAAJ,UAAAK,KAAAZ,OAAAD,QAAAC,OAAAA,OAAAD,QAAAO,qBAGAN,OAAAU,QAAA,EAGAV,OAAAD,QAvBA,GAAAS,oBAqCA,OATAF,qBAAAO,EAAAF,QAGAL,oBAAAQ,EAAAN,iBAGAF,oBAAAS,EAAA,GAGAT,oBAAA,kDCtCAN,OAAOD,QAAUO,oBAAQ,iDCAzB,YAYA,SAASU,eAAcC,WAErB,GAAIC,OAAQD,UAAUE,eAAiBF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,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;QAC/B,CAAC;OACF,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9C,MAAK,CAAC;AACN;AACA;AACA;AACA;AACA;;AAEA,KAAI,oBAAoB,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAI,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAI,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAI,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;KAEI,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC;OAC3B,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;OACzB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAC/B,MAAK,CAAC;AACN;AACA;AACA;AACA;;AAEA,KAAI,iBAAiB,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,KAAI,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAClC;AACA;AACA;AACA;AACA;AACA;AAC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AAC,CAAC,CAAC;AAC3B,GAAE;;EAED,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,EAAE;GACpD,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC;AAC9B,GAAE,MAAM,IAAI,IAA4E,CAAC;;GAEvF,kCAAO,YAAY;IAClB,OAAO,UAAU,CAAC;IAClB,sJAAC,CAAC;GACH,MAAM;GACN,MAAM,CAAC,UAAU,GAAG,UAAU,CAAC;AACjC,GAAE;;EAED,EAAE,EAAE;;;;;;;AChDL,OAAM,CAAC,OAAO,GAAG,WAAW;AAC5B,GAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,EAAE,CAAC;;GAE7C,IAAI,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,CAAC;GAClE,GAAG,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK;UACrB,IAAI,CAAC,MAAM,CAAC;UACZ,IAAI,CAAC,EAAE,CAAC;UACR,KAAK,CAAC,mBAAmB,CAAC,KAAK,MAAM,CAAC,KAAK,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;AACzE,SAAQ,CAAC,CAAC,CAAC;;GAET,IAAI,GAAG,KAAK,IAAI,EAAE,OAAO,GAAG,CAAC;GAC7B,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;EACrD,CAAC","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"React\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"React\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {\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 a6796d2f2639c0473e63\n **/","module.exports = require('./lib/draggable');\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","'use strict';\n\nvar React = require('react');\nvar emptyFunction = function(){};\nvar assign = require('object-assign');\nvar classNames = require('classnames');\nvar browserPrefix = require('./getPrefix')();\n\n//\n// Helpers. See Element definition below this section.\n//\n\nfunction createUIEvent(draggable) {\n // State changes are often (but not always!) async. We want the latest value.\n var state = draggable._pendingState || draggable.state;\n return {\n node: draggable.getDOMNode(),\n position: {\n top: state.clientY,\n left: state.clientX\n }\n };\n}\n\nfunction canDragX(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nfunction canDragY(draggable) {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\nfunction isFunction(func) {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nfunction findInArray(array, callback) {\n for (var i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nvar matchesSelectorFunc = '';\nfunction matchesSelector(el, selector) {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n return isFunction(el[method]);\n });\n }\n\n return el[matchesSelectorFunc].call(el, selector);\n}\n\n/**\n * simple abstraction for dragging events names\n * */\nvar eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n end: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n end: 'mouseup'\n }\n};\n\n// Default to mouse events\nvar dragEventFor = eventsFor.mouse;\n\n/**\n * get {clientX, clientY} positions of control\n * */\nfunction getControlPosition(e) {\n var position = (e.targetTouches && e.targetTouches[0]) || e;\n return {\n clientX: position.clientX,\n clientY: position.clientY\n };\n}\n\nfunction addEvent(el, event, handler) {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n el['on' + event] = handler;\n }\n}\n\nfunction removeEvent(el, event, handler) {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n el['on' + event] = null;\n }\n}\n\nfunction outerHeight(node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n var height = node.clientHeight;\n var computedStyle = window.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nfunction outerWidth(node) {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n var width = node.clientWidth;\n var computedStyle = window.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nfunction innerHeight(node) {\n var height = node.clientHeight;\n var computedStyle = window.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nfunction innerWidth(node) {\n var width = node.clientWidth;\n var computedStyle = window.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\nfunction isNum(num) {\n return typeof num === 'number' && !isNaN(num);\n}\n\nfunction int(a) {\n return parseInt(a, 10);\n}\n\nfunction getBoundPosition(draggable, clientX, clientY) {\n var bounds = JSON.parse(JSON.stringify(draggable.props.bounds));\n var node = draggable.getDOMNode();\n var parent = node.parentNode;\n\n if (bounds === 'parent') {\n var nodeStyle = window.getComputedStyle(node);\n var parentStyle = window.getComputedStyle(parent);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(parentStyle.paddingLeft) +\n int(nodeStyle.borderLeftWidth) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(parentStyle.paddingTop) +\n int(nodeStyle.borderTopWidth) + int(nodeStyle.marginTop),\n right: innerWidth(parent) - outerWidth(node) - node.offsetLeft,\n bottom: innerHeight(parent) - outerHeight(node) - node.offsetTop\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) clientX = Math.min(clientX, bounds.right);\n if (isNum(bounds.bottom)) clientY = Math.min(clientY, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) clientX = Math.max(clientX, bounds.left);\n if (isNum(bounds.top)) clientY = Math.max(clientY, bounds.top);\n\n return [clientX, clientY];\n}\n\nfunction snapToGrid(grid, pendingX, pendingY) {\n var x = Math.round(pendingX / grid[0]) * grid[0];\n var y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\n// Useful for preventing blue highlights all over everything when dragging.\nvar userSelectStyle = ';user-select: none;';\nif (browserPrefix) {\n userSelectStyle += '-' + browserPrefix.toLowerCase() + '-user-select: none;';\n}\n\nfunction addUserSelectStyles(draggable) {\n if (!draggable.props.enableUserSelectHack) return;\n var style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style + userSelectStyle);\n}\n\nfunction removeUserSelectStyles(draggable) {\n if (!draggable.props.enableUserSelectHack) return;\n var style = document.body.getAttribute('style') || '';\n document.body.setAttribute('style', style.replace(userSelectStyle, ''));\n}\n\nfunction createCSSTransform(style) {\n // Replace unitless items with px\n var x = style.x + 'px';\n var y = style.y + 'px';\n var out = {transform: 'translate(' + x + ',' + y + ')'};\n // Add single prefixed property as well\n if (browserPrefix) {\n out[browserPrefix + 'Transform'] = out.transform;\n }\n return out;\n}\n\nfunction createSVGTransform(args) {\n return 'translate(' + args.x + ',' + args.y + ')';\n}\n\n//\n// End Helpers.\n//\n\n//\n// Define \n//\n\nmodule.exports = React.createClass({\n displayName: 'Draggable',\n\n propTypes: {\n /**\n * `axis` determines which axis the draggable can move.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n *\n * Defaults to 'both'.\n */\n axis: React.PropTypes.oneOf(['both', 'x', 'y']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
Content
\n *
\n * );\n * }\n * });\n * ```\n */\n bounds: React.PropTypes.oneOfType([\n React.PropTypes.shape({\n left: React.PropTypes.Number,\n right: React.PropTypes.Number,\n top: React.PropTypes.Number,\n bottom: React.PropTypes.Number\n }),\n React.PropTypes.oneOf(['parent', false])\n ]),\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: React.PropTypes.bool,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * var 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: React.PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * var 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: React.PropTypes.string,\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I snap to a 25 x 25 grid
\n *
\n * );\n * }\n * });\n * ```\n */\n grid: React.PropTypes.arrayOf(React.PropTypes.number),\n\n /**\n * `start` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I start with transformX: 25px and transformY: 25px;
\n *
\n * );\n * }\n * });\n * ```\n */\n start: React.PropTypes.shape({\n x: React.PropTypes.number,\n y: React.PropTypes.number\n }),\n\n /**\n * `moveOnStartChange`, if true (default false) will move the element if the `start`\n * property changes.\n */\n moveOnStartChange: React.PropTypes.bool,\n\n\n /**\n * `zIndex` specifies the zIndex to use while dragging.\n *\n * Example:\n *\n * ```jsx\n * var App = React.createClass({\n * render: function () {\n * return (\n * \n *
I have a zIndex
\n *
\n * );\n * }\n * });\n * ```\n */\n zIndex: React.PropTypes.number,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStart: React.PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onDrag: React.PropTypes.func,\n\n /**\n * Called when dragging stops.\n *\n * Example:\n *\n * ```js\n * function (event, ui) {}\n * ```\n *\n * `event` is the Event that was triggered.\n * `ui` is an object:\n *\n * ```js\n * {\n * position: {top: 0, left: 0}\n * }\n * ```\n */\n onStop: React.PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (due to that there's internal use of onMouseDown)\n */\n onMouseDown: React.PropTypes.func,\n },\n\n componentWillReceiveProps: function(newProps) {\n // React to changes in the 'start' param.\n if (newProps.moveOnStartChange && newProps.start) {\n this.setState(this.getInitialState(newProps));\n }\n },\n\n componentDidMount: function() {\n // Check to see if the element passed is an instanceof SVGElement\n if( React.findDOMNode(this) instanceof SVGElement) {\n this.setState({ isElementSVG: true });\n }\n },\n\n componentWillUnmount: function() {\n // Remove any leftover event handlers\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.end, this.handleDragEnd);\n removeUserSelectStyles(this);\n },\n\n getDefaultProps: function () {\n return {\n axis: 'both',\n bounds: false,\n handle: null,\n cancel: null,\n grid: null,\n moveOnStartChange: false,\n start: {x: 0, y: 0},\n zIndex: NaN,\n enableUserSelectHack: true,\n onStart: emptyFunction,\n onDrag: emptyFunction,\n onStop: emptyFunction,\n onMouseDown: emptyFunction,\n };\n },\n\n getInitialState: function (props) {\n // Handle call from CWRP\n props = props || this.props;\n return {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Offset between start top/left and mouse top/left while dragging.\n offsetX: 0, offsetY: 0,\n\n // Current transform x and y.\n clientX: props.start.x, clientY: props.start.y,\n\n // Can only determine if is SVG after mounted\n isElementSVG: false\n\n };\n },\n\n handleDragStart: function (e) {\n // Set touch identifier in component state if this is a touch event\n if(e.targetTouches){\n this.setState({touchIdentifier: e.targetTouches[0].identifier});\n }\n\n // Make it possible to attach event handlers on top of this one\n this.props.onMouseDown(e);\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match\n if ((this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n (this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n return;\n }\n\n // Call event handler. If it returns explicit false, cancel.\n var shouldStart = this.props.onStart(e, createUIEvent(this));\n if (shouldStart === false) return;\n\n var dragPoint = getControlPosition(e);\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n addUserSelectStyles(this);\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 offsetX: dragPoint.clientX - this.state.clientX,\n offsetY: dragPoint.clientY - this.state.clientY,\n scrollX: document.body.scrollLeft,\n scrollY: document.body.scrollTop\n });\n\n\n // Add event handlers\n addEvent(document, 'scroll', this.handleScroll);\n addEvent(document, dragEventFor.move, this.handleDrag);\n addEvent(document, dragEventFor.end, this.handleDragEnd);\n },\n\n handleDragEnd: function (e) {\n // Short circuit if not currently dragging\n if (!this.state.dragging) {\n return;\n }\n\n // Short circuit if this is not the correct touch event\n if(e.changedTouches && (e.changedTouches[0].identifier != this.state.touchIdentifier)){\n return;\n }\n\n removeUserSelectStyles(this);\n\n // Turn off dragging\n this.setState({\n dragging: false\n });\n\n // Call event handler\n this.props.onStop(e, createUIEvent(this));\n\n // Remove event handlers\n removeEvent(document, 'scroll', this.handleScroll);\n removeEvent(document, dragEventFor.move, this.handleDrag);\n removeEvent(document, dragEventFor.end, this.handleDragEnd);\n },\n\n handleDrag: function (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)){\n return;\n }\n var dragPoint = getControlPosition(e);\n\n // Calculate X and Y\n var clientX = dragPoint.clientX - this.state.offsetX;\n var clientY = dragPoint.clientY - this.state.offsetY;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n var coords = snapToGrid(this.props.grid, clientX, clientY);\n clientX = coords[0];\n clientY = coords[1];\n }\n\n if (this.props.bounds) {\n var pos = getBoundPosition(this, clientX, clientY);\n clientX = pos[0];\n clientY = pos[1];\n }\n\n // Call event handler. If it returns explicit false, cancel.\n var shouldUpdate = this.props.onDrag(e, createUIEvent(this));\n if (shouldUpdate === false) return this.handleDragEnd({});\n\n // Update transform\n this.setState({\n clientX: clientX,\n clientY: clientY\n });\n },\n\n handleScroll: function(e) {\n var s = this.state, x = document.body.scrollLeft, y = document.body.scrollTop;\n var offsetX = x - s.scrollX, offsetY = y - s.scrollY;\n this.setState({\n scrollX: x,\n scrollY: y,\n clientX: s.clientX + offsetX,\n clientY: s.clientY + offsetY,\n offsetX: s.offsetX - offsetX,\n offsetY: s.offsetY - offsetY\n });\n },\n\n onMouseDown: function(ev) {\n // Prevent 'ghost click' which happens 300ms after touchstart if the event isn't cancelled.\n // We don't cancel the event on touchstart because of #37; we might want to make a scrollable item draggable.\n // More on ghost clicks: http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/\n if (dragEventFor === eventsFor.touch) {\n return ev.preventDefault();\n }\n\n return this.handleDragStart.apply(this, arguments);\n },\n\n onTouchStart: function(ev) {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart.apply(this, arguments);\n },\n\n // Intended for use by a parent component. Resets internal state on this component. Useful for\n // and other components in case this element is manually resized and start/moveOnStartChange\n // don't work for you.\n resetState: function() {\n this.setState({\n offsetX: 0, offsetY: 0, clientX: 0, clientY: 0\n });\n },\n\n render: function () {\n // Create style object. We extend from existing styles so we don't\n // remove anything already set (like background, color, etc).\n var childStyle = this.props.children.props.style || {};\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 var transform = this.state.isElementSVG ? null :\n createCSSTransform({\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n });\n\n\n var svgTransform = !this.state.isElementSVG ? null :\n createSVGTransform({\n // Set left if horizontal drag is enabled\n x: canDragX(this) ?\n this.state.clientX :\n this.props.start.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n this.props.start.y\n });\n\n\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n var touchHacks = {\n touchAction: 'none'\n };\n\n var style = assign({}, childStyle, transform, touchHacks);\n\n // Set zIndex if currently dragging and prop has been provided\n if (this.state.dragging && !isNaN(this.props.zIndex)) {\n style.zIndex = this.props.zIndex;\n }\n\n var 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 React.cloneElement(React.Children.only(this.props.children), {\n style: style,\n transform: svgTransform,\n className: className,\n\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.handleDragEnd,\n onTouchEnd: this.handleDragEnd\n });\n }\n});\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/draggable.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"React\"\n ** module id = 2\n ** module chunks = 0\n **/","/* eslint-disable no-unused-vars */\n'use strict';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nmodule.exports = Object.assign || function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (Object.getOwnPropertySymbols) {\n\t\t\tsymbols = Object.getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/object-assign/index.js\n **/","/*!\n Copyright (c) 2015 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n\n(function () {\n\t'use strict';\n\n\tfunction classNames () {\n\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 ('string' === argType || 'number' === argType) {\n\t\t\t\tclasses += ' ' + arg;\n\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\n\t\t\t} else if ('object' === argType) {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (arg.hasOwnProperty(key) && arg[key]) {\n\t\t\t\t\t\tclasses += ' ' + key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.substr(1);\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd){\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine(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.exports = function() {\n if (typeof window === 'undefined') return '';\n // Thanks David Walsh\n var styles = window.getComputedStyle(document.documentElement, ''),\n pre = (Array.prototype.slice\n .call(styles)\n .join('')\n .match(/-(moz|webkit|ms)-/) || (styles.OLink === '' && ['', 'o'])\n )[1];\n // 'ms' is not titlecased\n if (pre === 'ms') return pre;\n return pre.slice(0, 1).toUpperCase() + pre.slice(1);\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./lib/getPrefix.js\n **/"]} \ No newline at end of file diff --git a/package.json b/package.json index ceb8784a..cf17018f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "0.8.3", + "version": "0.8.4", "description": "React draggable component", "main": "index.js", "scripts": {