From a5d59832266eb01ceb873dcf94eaf53d3791fde0 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Thu, 7 May 2015 20:31:21 -0500 Subject: [PATCH] release v0.7.0 --- bower.json | 2 +- dist/react-draggable.js | 3 --- dist/react-draggable.map | 2 +- dist/react-draggable.min.js | 2 +- dist/react-draggable.min.map | 2 +- package.json | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index 8f0fcb05..d4f3020f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "0.6.0", + "version": "0.7.0", "homepage": "https://github.com/mzabriskie/react-draggable", "authors": [ "Matt Zabriskie" diff --git a/dist/react-draggable.js b/dist/react-draggable.js index a87288bb..00e6c3ee 100644 --- a/dist/react-draggable.js +++ b/dist/react-draggable.js @@ -248,9 +248,6 @@ return /******/ (function(modules) { // webpackBootstrap right: innerWidth(parent) - outerWidth(node) - node.offsetLeft, bottom: innerHeight(parent) - outerHeight(node) - node.offsetTop }; - } else { - if (isNum(bounds.right)) bounds.right -= outerWidth(node); - if (isNum(bounds.bottom)) bounds.bottom -= outerHeight(node); } // Keep x and y below right and bottom limits... diff --git a/dist/react-draggable.map b/dist/react-draggable.map index 5290928e..840bd1ab 100644 --- a/dist/react-draggable.map +++ b/dist/react-draggable.map @@ -1 +1 @@ -{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap 7d097448d93b4ff4e08e",".././index.js",".././lib/draggable.js","../external \"React\"",".././~/object-assign/index.js",".././~/classnames/index.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;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,OAAM,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ACA;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;;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;;AAEA,KAAI,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AACjC;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,IAAI;AAChC;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,IAAI;AAChC;AACA;AACA;AACA;;KAEI,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AACrC,IAAG;;AAEH,GAAE,oBAAoB,EAAE,WAAW;;KAE/B,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;KAC3D,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;KAC7D,sBAAsB,CAAC,IAAI,CAAC,CAAC;AACjC,IAAG;;GAED,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KAAK,OAAO,GAAG,EAAE;IACvD,OAAO,IAAI,GAAG,GAAG,GAAG,CAAC;IACrB,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,gBAAgB,EAAE;IACpE,OAAO,IAAI,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC7C,MAAM,IAAI,QAAQ,KAAK,OAAO,GAAG,EAAE;IACnC,KAAK,IAAI,GAAG,IAAI,GAAG,EAAE;KACpB,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;MAC1C,SAAS;MACT;KACD,OAAO,IAAI,GAAG,GAAG,GAAG,CAAC;KACrB;IACD;GACD;EACD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1B,EAAC;;AAED,kDAAiD;AACjD,KAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,EAAE;EACpD,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC;AAC7B,EAAC;;AAED,0CAAyC;AACzC,KAAI,IAA2C,EAAE;EAChD,iCAAqB,EAAE,kCAAE,WAAW;GACnC,OAAO,UAAU,CAAC;GAClB,+IAAC,CAAC;EACH","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 7d097448d93b4ff4e08e\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');\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 canDragY(draggable) {\n return draggable.props.axis === 'both' ||\n draggable.props.axis === 'y';\n}\n\nfunction canDragX(draggable) {\n return draggable.props.axis === 'both' ||\n draggable.props.axis === 'x';\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\nfunction matchesSelector(el, selector) {\n var method = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n return isFunction(el[method]);\n });\n\n return el[method].call(el, selector);\n}\n\n// @credits: http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript/4819886#4819886\n/* Conditional to fix node server side rendering of component */\nif (typeof window === 'undefined') {\n // Do Node Stuff\n var isTouchDevice = false;\n} else {\n // Do Browser Stuff\n var isTouchDevice = 'ontouchstart' in window || // works on most browsers\n 'onmsgesturechange' in window; // works on ie10 on ms surface\n\n}\n\n// look ::handleDragStart\n//function isMultiTouch(e) {\n// return e.touches && Array.isArray(e.touches) && e.touches.length > 1\n//}\n\n/**\n * simple abstraction for dragging events names\n * */\nvar dragEventFor = (function () {\n var 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 return eventsFor[isTouchDevice ? 'touch' : 'mouse'];\n})();\n\n/**\n * get {clientX, clientY} positions of control\n * */\nfunction getControlPosition(e) {\n var position = (e.touches && e.touches[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 } else {\n if (isNum(bounds.right)) bounds.right -= outerWidth(node);\n if (isNum(bounds.bottom)) bounds.bottom -= outerHeight(node);\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;-webkit-user-select:none;-moz-user-select:none;' +\n '-o-user-select:none;-ms-user-select:none;';\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 if (!style.x && !style.y) return {};\n // Replace unitless items with px\n var x = style.x + 'px';\n var y = style.y + 'px';\n return {\n transform: 'translate(' + x + ',' + y + ')',\n WebkitTransform: 'translate(' + x + ',' + y + ')',\n OTransform: 'translate(' + x + ',' + y + ')',\n msTransform: 'translate(' + x + ',' + y + ')',\n MozTransform: 'translate(' + x + ',' + y + ')'\n };\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 * `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 componentWillUnmount: function() {\n // Remove any leftover event handlers\n removeEvent(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, 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 zIndex: NaN,\n enableUserSelectHack: true,\n onStart: emptyFunction,\n onDrag: emptyFunction,\n onStop: emptyFunction,\n onMouseDown: emptyFunction\n };\n },\n\n getInitialState: function () {\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: 0, clientY: 0\n };\n },\n\n handleDragStart: function (e) {\n // todo: write right implementation to prevent multitouch drag\n // prevent multi-touch events\n // if (isMultiTouch(e)) {\n // this.handleDragEnd.apply(e, arguments);\n // return\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 });\n\n\n // Add event handlers\n addEvent(window, dragEventFor['move'], this.handleDrag);\n addEvent(window, 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 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(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, dragEventFor['end'], this.handleDragEnd);\n },\n\n handleDrag: function (e) {\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], clientY = coords[1];\n }\n\n if (this.props.bounds) {\n var pos = getBoundPosition(this, clientX, clientY);\n clientX = pos[0], 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 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 0,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n 0\n });\n var style = assign({}, childStyle, transform);\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.handleDragStart,\n onTouchStart: function(ev){\n ev.preventDefault(); // prevent for scroll\n return this.handleDragStart.apply(this, arguments);\n }.bind(this),\n\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 **/","'use strict';\n\nfunction ToObject(val) {\n\tif (val == null) {\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 keys;\n\tvar to = ToObject(target);\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = arguments[s];\n\t\tkeys = Object.keys(Object(from));\n\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tto[keys[i]] = from[keys[i]];\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\nfunction classNames() {\n\tvar classes = '';\n\tvar arg;\n\n\tfor (var i = 0; i < arguments.length; i++) {\n\t\targ = arguments[i];\n\t\tif (!arg) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\tclasses += ' ' + arg;\n\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t} else if ('object' === typeof arg) {\n\t\t\tfor (var key in arg) {\n\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tclasses += ' ' + key;\n\t\t\t}\n\t\t}\n\t}\n\treturn classes.substr(1);\n}\n\n// safely export classNames for node / browserify\nif (typeof module !== 'undefined' && module.exports) {\n\tmodule.exports = classNames;\n}\n\n// safely export classNames for RequireJS\nif (typeof define !== 'undefined' && define.amd) {\n\tdefine('classnames', [], function() {\n\t\treturn classNames;\n\t});\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/classnames/index.js\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap ac25421a934ddd280a56",".././index.js",".././lib/draggable.js","../external \"React\"",".././~/object-assign/index.js",".././~/classnames/index.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;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA,OAAM,CAAC,OAAO,GAAG,mBAAO,CAAC,CAAiB,CAAC,CAAC;;;;;;;ACA5C,aAAY,CAAC;;AAEb,KAAI,KAAK,GAAG,mBAAO,CAAC,CAAO,CAAC,CAAC;AAC7B,KAAI,aAAa,G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AAC,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;AACA;AACA;;A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AC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;MAC1C,SAAS;MACT;KACD,OAAO,IAAI,GAAG,GAAG,GAAG,CAAC;KACrB;IACD;GACD;EACD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1B,EAAC;;AAED,kDAAiD;AACjD,KAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,EAAE;EACpD,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC;AAC7B,EAAC;;AAED,0CAAyC;AACzC,KAAI,IAA2C,EAAE;EAChD,iCAAqB,EAAE,kCAAE,WAAW;GACnC,OAAO,UAAU,CAAC;GAClB,+IAAC,CAAC;EACH","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 ac25421a934ddd280a56\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');\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 canDragY(draggable) {\n return draggable.props.axis === 'both' ||\n draggable.props.axis === 'y';\n}\n\nfunction canDragX(draggable) {\n return draggable.props.axis === 'both' ||\n draggable.props.axis === 'x';\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\nfunction matchesSelector(el, selector) {\n var method = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n return isFunction(el[method]);\n });\n\n return el[method].call(el, selector);\n}\n\n// @credits: http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript/4819886#4819886\n/* Conditional to fix node server side rendering of component */\nif (typeof window === 'undefined') {\n // Do Node Stuff\n var isTouchDevice = false;\n} else {\n // Do Browser Stuff\n var isTouchDevice = 'ontouchstart' in window || // works on most browsers\n 'onmsgesturechange' in window; // works on ie10 on ms surface\n\n}\n\n// look ::handleDragStart\n//function isMultiTouch(e) {\n// return e.touches && Array.isArray(e.touches) && e.touches.length > 1\n//}\n\n/**\n * simple abstraction for dragging events names\n * */\nvar dragEventFor = (function () {\n var 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 return eventsFor[isTouchDevice ? 'touch' : 'mouse'];\n})();\n\n/**\n * get {clientX, clientY} positions of control\n * */\nfunction getControlPosition(e) {\n var position = (e.touches && e.touches[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;-webkit-user-select:none;-moz-user-select:none;' +\n '-o-user-select:none;-ms-user-select:none;';\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 if (!style.x && !style.y) return {};\n // Replace unitless items with px\n var x = style.x + 'px';\n var y = style.y + 'px';\n return {\n transform: 'translate(' + x + ',' + y + ')',\n WebkitTransform: 'translate(' + x + ',' + y + ')',\n OTransform: 'translate(' + x + ',' + y + ')',\n msTransform: 'translate(' + x + ',' + y + ')',\n MozTransform: 'translate(' + x + ',' + y + ')'\n };\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 * `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 componentWillUnmount: function() {\n // Remove any leftover event handlers\n removeEvent(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, 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 zIndex: NaN,\n enableUserSelectHack: true,\n onStart: emptyFunction,\n onDrag: emptyFunction,\n onStop: emptyFunction,\n onMouseDown: emptyFunction\n };\n },\n\n getInitialState: function () {\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: 0, clientY: 0\n };\n },\n\n handleDragStart: function (e) {\n // todo: write right implementation to prevent multitouch drag\n // prevent multi-touch events\n // if (isMultiTouch(e)) {\n // this.handleDragEnd.apply(e, arguments);\n // return\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 });\n\n\n // Add event handlers\n addEvent(window, dragEventFor['move'], this.handleDrag);\n addEvent(window, 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 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(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, dragEventFor['end'], this.handleDragEnd);\n },\n\n handleDrag: function (e) {\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], clientY = coords[1];\n }\n\n if (this.props.bounds) {\n var pos = getBoundPosition(this, clientX, clientY);\n clientX = pos[0], 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 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 0,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n 0\n });\n var style = assign({}, childStyle, transform);\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.handleDragStart,\n onTouchStart: function(ev){\n ev.preventDefault(); // prevent for scroll\n return this.handleDragStart.apply(this, arguments);\n }.bind(this),\n\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 **/","'use strict';\n\nfunction ToObject(val) {\n\tif (val == null) {\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 keys;\n\tvar to = ToObject(target);\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = arguments[s];\n\t\tkeys = Object.keys(Object(from));\n\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tto[keys[i]] = from[keys[i]];\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\nfunction classNames() {\n\tvar classes = '';\n\tvar arg;\n\n\tfor (var i = 0; i < arguments.length; i++) {\n\t\targ = arguments[i];\n\t\tif (!arg) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\tclasses += ' ' + arg;\n\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t} else if ('object' === typeof arg) {\n\t\t\tfor (var key in arg) {\n\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tclasses += ' ' + key;\n\t\t\t}\n\t\t}\n\t}\n\treturn classes.substr(1);\n}\n\n// safely export classNames for node / browserify\nif (typeof module !== 'undefined' && module.exports) {\n\tmodule.exports = classNames;\n}\n\n// safely export classNames for RequireJS\nif (typeof define !== 'undefined' && define.amd) {\n\tdefine('classnames', [], function() {\n\t\treturn classNames;\n\t});\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/classnames/index.js\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/react-draggable.min.js b/dist/react-draggable.min.js index ad076b4b..bb1f0d25 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 canDragY(draggable){return"both"===draggable.props.axis||"y"===draggable.props.axis}function canDragX(draggable){return"both"===draggable.props.axis||"x"===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){var method=findInArray(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(method){return isFunction(el[method])});return el[method].call(el,selector)}function getControlPosition(e){var position=e.touches&&e.touches[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}}else isNum(bounds.right)&&(bounds.right-=outerWidth(node)),isNum(bounds.bottom)&&(bounds.bottom-=outerHeight(node));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){if(!style.x&&!style.y)return{};var x=style.x+"px",y=style.y+"px";return{transform:"translate("+x+","+y+")",WebkitTransform:"translate("+x+","+y+")",OTransform:"translate("+x+","+y+")",msTransform:"translate("+x+","+y+")",MozTransform:"translate("+x+","+y+")"}}var React=__webpack_require__(2),emptyFunction=function(){},assign=__webpack_require__(3),classNames=__webpack_require__(4);if("undefined"==typeof window)var isTouchDevice=!1;else var isTouchDevice="ontouchstart"in window||"onmsgesturechange"in window;var dragEventFor=function(){var eventsFor={touch:{start:"touchstart",move:"touchmove",end:"touchend"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"}};return eventsFor[isTouchDevice?"touch":"mouse"]}(),userSelectStyle=";user-select: none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-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),zIndex:React.PropTypes.number,onStart:React.PropTypes.func,onDrag:React.PropTypes.func,onStop:React.PropTypes.func,onMouseDown:React.PropTypes.func},componentWillUnmount:function(){removeEvent(window,dragEventFor.move,this.handleDrag),removeEvent(window,dragEventFor.end,this.handleDragEnd),removeUserSelectStyles(this)},getDefaultProps:function(){return{axis:"both",bounds:!1,handle:null,cancel:null,grid:null,zIndex:0/0,enableUserSelectHack:!0,onStart:emptyFunction,onDrag:emptyFunction,onStop:emptyFunction,onMouseDown:emptyFunction}},getInitialState:function(){return{dragging:!1,offsetX:0,offsetY:0,clientX:0,clientY:0}},handleDragStart:function(e){if(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}),addEvent(window,dragEventFor.move,this.handleDrag),addEvent(window,dragEventFor.end,this.handleDragEnd)}}},handleDragEnd:function(e){this.state.dragging&&(removeUserSelectStyles(this),this.setState({dragging:!1}),this.props.onStop(e,createUIEvent(this)),removeEvent(window,dragEventFor.move,this.handleDrag),removeEvent(window,dragEventFor.end,this.handleDragEnd))},handleDrag:function(e){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})},render:function(){var childStyle=this.props.children.props.style||{},transform=createCSSTransform({x:canDragX(this)?this.state.clientX:0,y:canDragY(this)?this.state.clientY:0}),style=assign({},childStyle,transform);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.handleDragStart,onTouchStart:function(ev){return ev.preventDefault(),this.handleDragStart.apply(this,arguments)}.bind(this),onMouseUp:this.handleDragEnd,onTouchEnd:this.handleDragEnd})}})},function(module,exports,__webpack_require__){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},function(module,exports,__webpack_require__){"use strict";function ToObject(val){if(null==val)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(val)}module.exports=Object.assign||function(target,source){for(var from,keys,to=ToObject(target),s=1;si;i++)if(callback.apply(callback,[array[i],i,array]))return array[i]}function matchesSelector(el,selector){var method=findInArray(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(method){return isFunction(el[method])});return el[method].call(el,selector)}function getControlPosition(e){var position=e.touches&&e.touches[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){if(!style.x&&!style.y)return{};var x=style.x+"px",y=style.y+"px";return{transform:"translate("+x+","+y+")",WebkitTransform:"translate("+x+","+y+")",OTransform:"translate("+x+","+y+")",msTransform:"translate("+x+","+y+")",MozTransform:"translate("+x+","+y+")"}}var React=__webpack_require__(2),emptyFunction=function(){},assign=__webpack_require__(3),classNames=__webpack_require__(4);if("undefined"==typeof window)var isTouchDevice=!1;else var isTouchDevice="ontouchstart"in window||"onmsgesturechange"in window;var dragEventFor=function(){var eventsFor={touch:{start:"touchstart",move:"touchmove",end:"touchend"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"}};return eventsFor[isTouchDevice?"touch":"mouse"]}(),userSelectStyle=";user-select: none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;-ms-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),zIndex:React.PropTypes.number,onStart:React.PropTypes.func,onDrag:React.PropTypes.func,onStop:React.PropTypes.func,onMouseDown:React.PropTypes.func},componentWillUnmount:function(){removeEvent(window,dragEventFor.move,this.handleDrag),removeEvent(window,dragEventFor.end,this.handleDragEnd),removeUserSelectStyles(this)},getDefaultProps:function(){return{axis:"both",bounds:!1,handle:null,cancel:null,grid:null,zIndex:0/0,enableUserSelectHack:!0,onStart:emptyFunction,onDrag:emptyFunction,onStop:emptyFunction,onMouseDown:emptyFunction}},getInitialState:function(){return{dragging:!1,offsetX:0,offsetY:0,clientX:0,clientY:0}},handleDragStart:function(e){if(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}),addEvent(window,dragEventFor.move,this.handleDrag),addEvent(window,dragEventFor.end,this.handleDragEnd)}}},handleDragEnd:function(e){this.state.dragging&&(removeUserSelectStyles(this),this.setState({dragging:!1}),this.props.onStop(e,createUIEvent(this)),removeEvent(window,dragEventFor.move,this.handleDrag),removeEvent(window,dragEventFor.end,this.handleDragEnd))},handleDrag:function(e){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})},render:function(){var childStyle=this.props.children.props.style||{},transform=createCSSTransform({x:canDragX(this)?this.state.clientX:0,y:canDragY(this)?this.state.clientY:0}),style=assign({},childStyle,transform);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.handleDragStart,onTouchStart:function(ev){return ev.preventDefault(),this.handleDragStart.apply(this,arguments)}.bind(this),onMouseUp:this.handleDragEnd,onTouchEnd:this.handleDragEnd})}})},function(module,exports,__webpack_require__){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},function(module,exports,__webpack_require__){"use strict";function ToObject(val){if(null==val)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(val)}module.exports=Object.assign||function(target,source){for(var from,keys,to=ToObject(target),s=1;s 1\n//}\n\n/**\n * simple abstraction for dragging events names\n * */\nvar dragEventFor = (function () {\n var 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 return eventsFor[isTouchDevice ? 'touch' : 'mouse'];\n})();\n\n/**\n * get {clientX, clientY} positions of control\n * */\nfunction getControlPosition(e) {\n var position = (e.touches && e.touches[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 } else {\n if (isNum(bounds.right)) bounds.right -= outerWidth(node);\n if (isNum(bounds.bottom)) bounds.bottom -= outerHeight(node);\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;-webkit-user-select:none;-moz-user-select:none;' +\n '-o-user-select:none;-ms-user-select:none;';\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 if (!style.x && !style.y) return {};\n // Replace unitless items with px\n var x = style.x + 'px';\n var y = style.y + 'px';\n return {\n transform: 'translate(' + x + ',' + y + ')',\n WebkitTransform: 'translate(' + x + ',' + y + ')',\n OTransform: 'translate(' + x + ',' + y + ')',\n msTransform: 'translate(' + x + ',' + y + ')',\n MozTransform: 'translate(' + x + ',' + y + ')'\n };\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 * `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 componentWillUnmount: function() {\n // Remove any leftover event handlers\n removeEvent(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, 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 zIndex: NaN,\n enableUserSelectHack: true,\n onStart: emptyFunction,\n onDrag: emptyFunction,\n onStop: emptyFunction,\n onMouseDown: emptyFunction\n };\n },\n\n getInitialState: function () {\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: 0, clientY: 0\n };\n },\n\n handleDragStart: function (e) {\n // todo: write right implementation to prevent multitouch drag\n // prevent multi-touch events\n // if (isMultiTouch(e)) {\n // this.handleDragEnd.apply(e, arguments);\n // return\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 });\n\n\n // Add event handlers\n addEvent(window, dragEventFor['move'], this.handleDrag);\n addEvent(window, 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 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(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, dragEventFor['end'], this.handleDragEnd);\n },\n\n handleDrag: function (e) {\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], clientY = coords[1];\n }\n\n if (this.props.bounds) {\n var pos = getBoundPosition(this, clientX, clientY);\n clientX = pos[0], 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 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 0,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n 0\n });\n var style = assign({}, childStyle, transform);\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.handleDragStart,\n onTouchStart: function(ev){\n ev.preventDefault(); // prevent for scroll\n return this.handleDragStart.apply(this, arguments);\n }.bind(this),\n\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 **/","'use strict';\n\nfunction ToObject(val) {\n\tif (val == null) {\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 keys;\n\tvar to = ToObject(target);\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = arguments[s];\n\t\tkeys = Object.keys(Object(from));\n\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tto[keys[i]] = from[keys[i]];\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\nfunction classNames() {\n\tvar classes = '';\n\tvar arg;\n\n\tfor (var i = 0; i < arguments.length; i++) {\n\t\targ = arguments[i];\n\t\tif (!arg) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\tclasses += ' ' + arg;\n\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t} else if ('object' === typeof arg) {\n\t\t\tfor (var key in arg) {\n\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tclasses += ' ' + key;\n\t\t\t}\n\t\t}\n\t}\n\treturn classes.substr(1);\n}\n\n// safely export classNames for node / browserify\nif (typeof module !== 'undefined' && module.exports) {\n\tmodule.exports = classNames;\n}\n\n// safely export classNames for RequireJS\nif (typeof define !== 'undefined' && define.amd) {\n\tdefine('classnames', [], function() {\n\t\treturn classNames;\n\t});\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/classnames/index.js\n **/"]} \ No newline at end of file +{"version":3,"file":"./dist/react-draggable.js","sources":["../webpack/universalModuleDefinition","../webpack/bootstrap ac25421a934ddd280a56",".././index.js",".././lib/draggable.js","../external \"React\"",".././~/object-assign/index.js",".././~/classnames/index.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","canDragY","props","axis","canDragX","isFunction","func","Object","prototype","toString","findInArray","array","callback","i","length","apply","matchesSelector","el","selector","method","getControlPosition","e","touches","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","transform","WebkitTransform","OTransform","msTransform","MozTransform","React","emptyFunction","assign","classNames","isTouchDevice","dragEventFor","eventsFor","touch","start","move","end","mouse","createClass","displayName","propTypes","PropTypes","oneOf","oneOfType","shape","Number","bool","handle","string","cancel","arrayOf","number","zIndex","onStart","onDrag","onStop","onMouseDown","componentWillUnmount","handleDrag","handleDragEnd","getDefaultProps","NaN","getInitialState","dragging","offsetX","offsetY","handleDragStart","target","shouldStart","dragPoint","setState","Array","isArray","coords","pos","shouldUpdate","render","childStyle","children","className","react-draggable-dragging","react-draggable-dragged","dragged","cloneElement","Children","only","onTouchStart","ev","preventDefault","arguments","bind","onMouseUp","onTouchEnd","ToObject","val","TypeError","source","from","keys","to","s","arg","classes","key","hasOwnProperty","substr","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","undefined"],"mappings":"AAAA,CAAA,SAAAA,KAAAC,SACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,QAAAG,QAAA,UACA,kBAAAC,SAAAA,OAAAC,IACAD,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AAK,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;;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;;AAEA,KAAI,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AACjC;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,IAAI;AAChC;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,IAAI;AAChC;AACA;AACA;AACA;;KAEI,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AACrC,IAAG;;AAEH,GAAE,oBAAoB,EAAE,WAAW;;KAE/B,WAAW,CAAC,MA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,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;GAC1C,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;GACnB,IAAI,CAAC,GAAG,EAAE;IACT,SAAS;AACZ,IAAG;;GAED,IAAI,QAAQ,KAAK,OAAO,GAAG,IAAI,QAAQ,KAAK,OAAO,GAAG,EAAE;IACvD,OAAO,IAAI,GAAG,GAAG,GAAG,CAAC;IACrB,MAAM,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,gBAAgB,EAAE;IACpE,OAAO,IAAI,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC7C,MAAM,IAAI,QAAQ,KAAK,OAAO,GAAG,EAAE;IACnC,KAAK,IAAI,GAAG,IAAI,GAAG,EAAE;KACpB,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;MAC1C,SAAS;MACT;KACD,OAAO,IAAI,GAAG,GAAG,GAAG,CAAC;KACrB;IACD;GACD;EACD,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAC1B,EAAC;;AAED,kDAAiD;AACjD,KAAI,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,OAAO,EAAE;EACpD,MAAM,CAAC,OAAO,GAAG,UAAU,CAAC;AAC7B,EAAC;;AAED,0CAAyC;AACzC,KAAI,IAA2C,EAAE;EAChD,iCAAqB,EAAE,kCAAE,WAAW;GACnC,OAAO,UAAU,CAAC;GAClB,+IAAC,CAAC;EACH","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 ac25421a934ddd280a56\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');\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 canDragY(draggable) {\n return draggable.props.axis === 'both' ||\n draggable.props.axis === 'y';\n}\n\nfunction canDragX(draggable) {\n return draggable.props.axis === 'both' ||\n draggable.props.axis === 'x';\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\nfunction matchesSelector(el, selector) {\n var method = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n return isFunction(el[method]);\n });\n\n return el[method].call(el, selector);\n}\n\n// @credits: http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript/4819886#4819886\n/* Conditional to fix node server side rendering of component */\nif (typeof window === 'undefined') {\n // Do Node Stuff\n var isTouchDevice = false;\n} else {\n // Do Browser Stuff\n var isTouchDevice = 'ontouchstart' in window || // works on most browsers\n 'onmsgesturechange' in window; // works on ie10 on ms surface\n\n}\n\n// look ::handleDragStart\n//function isMultiTouch(e) {\n// return e.touches && Array.isArray(e.touches) && e.touches.length > 1\n//}\n\n/**\n * simple abstraction for dragging events names\n * */\nvar dragEventFor = (function () {\n var 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 return eventsFor[isTouchDevice ? 'touch' : 'mouse'];\n})();\n\n/**\n * get {clientX, clientY} positions of control\n * */\nfunction getControlPosition(e) {\n var position = (e.touches && e.touches[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;-webkit-user-select:none;-moz-user-select:none;' +\n '-o-user-select:none;-ms-user-select:none;';\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 if (!style.x && !style.y) return {};\n // Replace unitless items with px\n var x = style.x + 'px';\n var y = style.y + 'px';\n return {\n transform: 'translate(' + x + ',' + y + ')',\n WebkitTransform: 'translate(' + x + ',' + y + ')',\n OTransform: 'translate(' + x + ',' + y + ')',\n msTransform: 'translate(' + x + ',' + y + ')',\n MozTransform: 'translate(' + x + ',' + y + ')'\n };\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 * `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 componentWillUnmount: function() {\n // Remove any leftover event handlers\n removeEvent(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, 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 zIndex: NaN,\n enableUserSelectHack: true,\n onStart: emptyFunction,\n onDrag: emptyFunction,\n onStop: emptyFunction,\n onMouseDown: emptyFunction\n };\n },\n\n getInitialState: function () {\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: 0, clientY: 0\n };\n },\n\n handleDragStart: function (e) {\n // todo: write right implementation to prevent multitouch drag\n // prevent multi-touch events\n // if (isMultiTouch(e)) {\n // this.handleDragEnd.apply(e, arguments);\n // return\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 });\n\n\n // Add event handlers\n addEvent(window, dragEventFor['move'], this.handleDrag);\n addEvent(window, 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 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(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, dragEventFor['end'], this.handleDragEnd);\n },\n\n handleDrag: function (e) {\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], clientY = coords[1];\n }\n\n if (this.props.bounds) {\n var pos = getBoundPosition(this, clientX, clientY);\n clientX = pos[0], 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 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 0,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) ?\n this.state.clientY :\n 0\n });\n var style = assign({}, childStyle, transform);\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.handleDragStart,\n onTouchStart: function(ev){\n ev.preventDefault(); // prevent for scroll\n return this.handleDragStart.apply(this, arguments);\n }.bind(this),\n\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 **/","'use strict';\n\nfunction ToObject(val) {\n\tif (val == null) {\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 keys;\n\tvar to = ToObject(target);\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = arguments[s];\n\t\tkeys = Object.keys(Object(from));\n\n\t\tfor (var i = 0; i < keys.length; i++) {\n\t\t\tto[keys[i]] = from[keys[i]];\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\nfunction classNames() {\n\tvar classes = '';\n\tvar arg;\n\n\tfor (var i = 0; i < arguments.length; i++) {\n\t\targ = arguments[i];\n\t\tif (!arg) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ('string' === typeof arg || 'number' === typeof arg) {\n\t\t\tclasses += ' ' + arg;\n\t\t} else if (Object.prototype.toString.call(arg) === '[object Array]') {\n\t\t\tclasses += ' ' + classNames.apply(null, arg);\n\t\t} else if ('object' === typeof arg) {\n\t\t\tfor (var key in arg) {\n\t\t\t\tif (!arg.hasOwnProperty(key) || !arg[key]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tclasses += ' ' + key;\n\t\t\t}\n\t\t}\n\t}\n\treturn classes.substr(1);\n}\n\n// safely export classNames for node / browserify\nif (typeof module !== 'undefined' && module.exports) {\n\tmodule.exports = classNames;\n}\n\n// safely export classNames for RequireJS\nif (typeof define !== 'undefined' && define.amd) {\n\tdefine('classnames', [], function() {\n\t\treturn classNames;\n\t});\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/classnames/index.js\n **/"]} \ No newline at end of file diff --git a/package.json b/package.json index 8163bab1..fbd77c73 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "0.6.0", + "version": "0.7.0", "description": "React draggable component", "main": "index.js", "scripts": {