1 line
67 KiB
Plaintext
1 line
67 KiB
Plaintext
{"version":3,"file":"react-draggable.min.js","sources":["../node_modules/fbjs/lib/emptyFunction.js","../node_modules/fbjs/lib/invariant.js","../node_modules/object-assign/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/index.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/classnames/index.js","../lib/utils/shims.js","../lib/utils/getPrefix.js","../lib/utils/domFns.js","../lib/utils/positionFns.js","../lib/DraggableCore.js","../lib/Draggable.js","../lib/umd.js"],"sourcesContent":["\"use strict\";\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\n\nfunction makeEmptyFunction(arg) {\n return function () {\n return arg;\n };\n}\n\n/**\n * This function accepts and discards inputs; it has no side effects. This is\n * primarily useful idiomatically for overridable function endpoints which\n * always need to be callable, since JS lacks a null-call idiom ala Cocoa.\n */\nvar emptyFunction = function emptyFunction() {};\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function () {\n return this;\n};\nemptyFunction.thatReturnsArgument = function (arg) {\n return arg;\n};\n\nmodule.exports = emptyFunction;","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar validateFormat = function validateFormat(format) {};\n\nif (process.env.NODE_ENV !== 'production') {\n validateFormat = function validateFormat(format) {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n };\n}\n\nfunction invariant(condition, format, a, b, c, d, e, f) {\n validateFormat(format);\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(format.replace(/%s/g, function () {\n return args[argIndex++];\n }));\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n}\n\nmodule.exports = invariant;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n\n var isValidElement = function(object) {\n return typeof object === 'object' &&\n object !== null &&\n object.$$typeof === REACT_ELEMENT_TYPE;\n };\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(isValidElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar emptyFunction = require('fbjs/lib/emptyFunction');\nvar invariant = require('fbjs/lib/invariant');\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n invariant(\n false,\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim\n };\n\n ReactPropTypes.checkPropTypes = emptyFunction;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/*!\n Copyright (c) 2016 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tclasses.push(classNames.apply(null, arg));\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","// @flow\n// @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc\nexport function findInArray(array: Array<any> | TouchList, callback: Function): any {\n for (let i = 0, length = array.length; i < length; i++) {\n if (callback.apply(callback, [array[i], i, array])) return array[i];\n }\n}\n\nexport function isFunction(func: any): boolean {\n return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';\n}\n\nexport function isNum(num: any): boolean {\n return typeof num === 'number' && !isNaN(num);\n}\n\nexport function int(a: string): number {\n return parseInt(a, 10);\n}\n\nexport function dontSetMe(props: Object, propName: string, componentName: string) {\n if (props[propName]) {\n return new Error(`Invalid prop ${propName} passed to ${componentName} - do not set this, set it on the child.`);\n }\n}\n","// @flow\nconst prefixes = ['Moz', 'Webkit', 'O', 'ms'];\nexport function getPrefix(prop: string='transform'): string {\n // Checking specifically for 'window.document' is for pseudo-browser server-side\n // environments that define 'window' as the global context.\n // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)\n if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';\n\n const style = window.document.documentElement.style;\n\n if (prop in style) return '';\n\n for (let i = 0; i < prefixes.length; i++) {\n if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];\n }\n\n return '';\n}\n\nexport function browserPrefixToKey(prop: string, prefix: string): string {\n return prefix ? `${prefix}${kebabToTitleCase(prop)}` : prop;\n}\n\nexport function browserPrefixToStyle(prop: string, prefix: string): string {\n return prefix ? `-${prefix.toLowerCase()}-${prop}` : prop;\n}\n\nfunction kebabToTitleCase(str: string): string {\n let out = '';\n let shouldCapitalize = true;\n for (let i = 0; i < str.length; i++) {\n if (shouldCapitalize) {\n out += str[i].toUpperCase();\n shouldCapitalize = false;\n } else if (str[i] === '-') {\n shouldCapitalize = true;\n } else {\n out += str[i];\n }\n }\n return out;\n}\n\n// Default export is the prefix itself, like 'Moz', 'Webkit', etc\n// Note that you may have to re-test for certain things; for instance, Chrome 50\n// can handle unprefixed `transform`, but not unprefixed `user-select`\nexport default getPrefix();\n","// @flow\nimport {findInArray, isFunction, int} from './shims';\nimport browserPrefix, {browserPrefixToKey} from './getPrefix';\n\nimport type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';\n\nlet matchesSelectorFunc = '';\nexport function matchesSelector(el: Node, selector: string): boolean {\n if (!matchesSelectorFunc) {\n matchesSelectorFunc = findInArray([\n 'matches',\n 'webkitMatchesSelector',\n 'mozMatchesSelector',\n 'msMatchesSelector',\n 'oMatchesSelector'\n ], function(method){\n // $FlowIgnore: Doesn't think elements are indexable\n return isFunction(el[method]);\n });\n }\n\n // Might not be found entirely (not an Element?) - in that case, bail\n // $FlowIgnore: Doesn't think elements are indexable\n if (!isFunction(el[matchesSelectorFunc])) return false;\n\n // $FlowIgnore: Doesn't think elements are indexable\n return el[matchesSelectorFunc](selector);\n}\n\n// Works up the tree to the draggable itself attempting to match selector.\nexport function matchesSelectorAndParentsTo(el: Node, selector: string, baseNode: Node): boolean {\n let node = el;\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}\n\nexport function addEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.attachEvent) {\n el.attachEvent('on' + event, handler);\n } else if (el.addEventListener) {\n el.addEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = handler;\n }\n}\n\nexport function removeEvent(el: ?Node, event: string, handler: Function): void {\n if (!el) { return; }\n if (el.detachEvent) {\n el.detachEvent('on' + event, handler);\n } else if (el.removeEventListener) {\n el.removeEventListener(event, handler, true);\n } else {\n // $FlowIgnore: Doesn't think elements are indexable\n el['on' + event] = null;\n }\n}\n\nexport function outerHeight(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetTop which is including margin. See getBoundPosition\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height += int(computedStyle.borderTopWidth);\n height += int(computedStyle.borderBottomWidth);\n return height;\n}\n\nexport function outerWidth(node: HTMLElement): number {\n // This is deliberately excluding margin for our calculations, since we are using\n // offsetLeft which is including margin. See getBoundPosition\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width += int(computedStyle.borderLeftWidth);\n width += int(computedStyle.borderRightWidth);\n return width;\n}\nexport function innerHeight(node: HTMLElement): number {\n let height = node.clientHeight;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n height -= int(computedStyle.paddingTop);\n height -= int(computedStyle.paddingBottom);\n return height;\n}\n\nexport function innerWidth(node: HTMLElement): number {\n let width = node.clientWidth;\n const computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);\n width -= int(computedStyle.paddingLeft);\n width -= int(computedStyle.paddingRight);\n return width;\n}\n\n// Get from offsetParent\nexport function offsetXYFromParent(evt: {clientX: number, clientY: number}, offsetParent: HTMLElement): ControlPosition {\n const isBody = offsetParent === offsetParent.ownerDocument.body;\n const offsetParentRect = isBody ? {left: 0, top: 0} : offsetParent.getBoundingClientRect();\n\n const x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;\n const y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;\n\n return {x, y};\n}\n\nexport function createCSSTransform(controlPos: ControlPosition, positionOffset: PositionOffsetControlPosition): Object {\n const translation = getTranslation(controlPos, positionOffset, 'px');\n return {[browserPrefixToKey('transform', browserPrefix)]: translation };\n}\n\nexport function createSVGTransform(controlPos: ControlPosition, positionOffset: PositionOffsetControlPosition): string {\n const translation = getTranslation(controlPos, positionOffset, '');\n return translation;\n}\nexport function getTranslation({x, y}: ControlPosition, positionOffset: PositionOffsetControlPosition, unitSuffix: string): string {\n let translation = `translate(${x}${unitSuffix},${y}${unitSuffix})`;\n if (positionOffset) {\n const defaultX = `${(typeof positionOffset.x === 'string') ? positionOffset.x : positionOffset.x + unitSuffix}`;\n const defaultY = `${(typeof positionOffset.y === 'string') ? positionOffset.y : positionOffset.y + unitSuffix}`;\n translation = `translate(${defaultX}, ${defaultY})` + translation;\n }\n return translation;\n}\n\nexport function getTouch(e: MouseTouchEvent, identifier: number): ?{clientX: number, clientY: number} {\n return (e.targetTouches && findInArray(e.targetTouches, t => identifier === t.identifier)) ||\n (e.changedTouches && findInArray(e.changedTouches, t => identifier === t.identifier));\n}\n\nexport function getTouchIdentifier(e: MouseTouchEvent): ?number {\n if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;\n if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;\n}\n\n// User-select Hacks:\n//\n// Useful for preventing blue highlights all over everything when dragging.\n\n// Note we're passing `document` b/c we could be iframed\nexport function addUserSelectStyles(doc: ?Document) {\n if (!doc) return;\n let styleEl = doc.getElementById('react-draggable-style-el');\n if (!styleEl) {\n styleEl = doc.createElement('style');\n styleEl.type = 'text/css';\n styleEl.id = 'react-draggable-style-el';\n styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {all: inherit;}\\n';\n styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {all: inherit;}\\n';\n doc.getElementsByTagName('head')[0].appendChild(styleEl);\n }\n if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');\n}\n\nexport function removeUserSelectStyles(doc: ?Document) {\n try {\n if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');\n // $FlowIgnore: IE\n if (doc.selection) {\n // $FlowIgnore: IE\n doc.selection.empty();\n } else {\n window.getSelection().removeAllRanges(); // remove selection caused by scroll\n }\n } catch (e) {\n // probably IE\n }\n}\n\nexport function styleHacks(childStyle: Object = {}): Object {\n // Workaround IE pointer events; see #51\n // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278\n return {\n touchAction: 'none',\n ...childStyle\n };\n}\n\nexport function addClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.add(className);\n } else {\n if (!el.className.match(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`))) {\n el.className += ` ${className}`;\n }\n }\n}\n\nexport function removeClassName(el: HTMLElement, className: string) {\n if (el.classList) {\n el.classList.remove(className);\n } else {\n el.className = el.className.replace(new RegExp(`(?:^|\\\\s)${className}(?!\\\\S)`, 'g'), '');\n }\n}\n","// @flow\nimport {isNum, int} from './shims';\nimport ReactDOM from 'react-dom';\nimport {getTouch, innerWidth, innerHeight, offsetXYFromParent, outerWidth, outerHeight} from './domFns';\n\nimport type Draggable from '../Draggable';\nimport type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';\nimport type DraggableCore from '../DraggableCore';\n\nexport function getBoundPosition(draggable: Draggable, x: number, y: number): [number, number] {\n // If no bounds, short-circuit and move on\n if (!draggable.props.bounds) return [x, y];\n\n // Clone new bounds\n let {bounds} = draggable.props;\n bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);\n const node = findDOMNode(draggable);\n\n if (typeof bounds === 'string') {\n const {ownerDocument} = node;\n const ownerWindow = ownerDocument.defaultView;\n let boundNode;\n if (bounds === 'parent') {\n boundNode = node.parentNode;\n } else {\n boundNode = ownerDocument.querySelector(bounds);\n }\n if (!(boundNode instanceof ownerWindow.HTMLElement)) {\n throw new Error('Bounds selector \"' + bounds + '\" could not find an element.');\n }\n const nodeStyle = ownerWindow.getComputedStyle(node);\n const boundNodeStyle = ownerWindow.getComputedStyle(boundNode);\n // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.\n bounds = {\n left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) + int(nodeStyle.marginLeft),\n top: -node.offsetTop + int(boundNodeStyle.paddingTop) + int(nodeStyle.marginTop),\n right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft +\n int(boundNodeStyle.paddingRight) - int(nodeStyle.marginRight),\n bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop +\n int(boundNodeStyle.paddingBottom) - int(nodeStyle.marginBottom)\n };\n }\n\n // Keep x and y below right and bottom limits...\n if (isNum(bounds.right)) x = Math.min(x, bounds.right);\n if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);\n\n // But above left and top limits.\n if (isNum(bounds.left)) x = Math.max(x, bounds.left);\n if (isNum(bounds.top)) y = Math.max(y, bounds.top);\n\n return [x, y];\n}\n\nexport function snapToGrid(grid: [number, number], pendingX: number, pendingY: number): [number, number] {\n const x = Math.round(pendingX / grid[0]) * grid[0];\n const y = Math.round(pendingY / grid[1]) * grid[1];\n return [x, y];\n}\n\nexport function canDragX(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'x';\n}\n\nexport function canDragY(draggable: Draggable): boolean {\n return draggable.props.axis === 'both' || draggable.props.axis === 'y';\n}\n\n// Get {x, y} positions from event.\nexport function getControlPosition(e: MouseTouchEvent, touchIdentifier: ?number, draggableCore: DraggableCore): ?ControlPosition {\n const touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null;\n if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch\n const node = findDOMNode(draggableCore);\n // User can provide an offsetParent if desired.\n const offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;\n return offsetXYFromParent(touchObj || e, offsetParent);\n}\n\n// Create an data object exposed by <DraggableCore>'s events\nexport function createCoreData(draggable: DraggableCore, x: number, y: number): DraggableData {\n const state = draggable.state;\n const isStart = !isNum(state.lastX);\n const node = findDOMNode(draggable);\n\n if (isStart) {\n // If this is our first move, use the x and y as last coords.\n return {\n node,\n deltaX: 0, deltaY: 0,\n lastX: x, lastY: y,\n x, y,\n };\n } else {\n // Otherwise calculate proper values.\n return {\n node,\n deltaX: x - state.lastX, deltaY: y - state.lastY,\n lastX: state.lastX, lastY: state.lastY,\n x, y,\n };\n }\n}\n\n// Create an data exposed by <Draggable>'s events\nexport function createDraggableData(draggable: Draggable, coreData: DraggableData): DraggableData {\n const scale = draggable.props.scale;\n return {\n node: coreData.node,\n x: draggable.state.x + (coreData.deltaX / scale),\n y: draggable.state.y + (coreData.deltaY / scale),\n deltaX: (coreData.deltaX / scale),\n deltaY: (coreData.deltaY / scale),\n lastX: draggable.state.x,\n lastY: draggable.state.y\n };\n}\n\n// A lot faster than stringify/parse\nfunction cloneBounds(bounds: Bounds): Bounds {\n return {\n left: bounds.left,\n top: bounds.top,\n right: bounds.right,\n bottom: bounds.bottom\n };\n}\n\nfunction findDOMNode(draggable: Draggable | DraggableCore): HTMLElement {\n const node = ReactDOM.findDOMNode(draggable);\n if (!node) {\n throw new Error('<DraggableCore>: Unmounted during event!');\n }\n // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME\n return node;\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport {matchesSelectorAndParentsTo, addEvent, removeEvent, addUserSelectStyles, getTouchIdentifier,\n removeUserSelectStyles, styleHacks} from './utils/domFns';\nimport {createCoreData, getControlPosition, snapToGrid} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport log from './utils/log';\n\nimport type {EventHandler, MouseTouchEvent} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\n// Simple abstraction for dragging events names.\nconst eventsFor = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// Default to mouse events.\nlet dragEventFor = eventsFor.mouse;\n\ntype DraggableCoreState = {\n dragging: boolean,\n lastX: number,\n lastY: number,\n touchIdentifier: ?number\n};\n\nexport type DraggableBounds = {\n left: number,\n right: number,\n top: number,\n bottom: number,\n};\n\nexport type DraggableData = {\n node: HTMLElement,\n x: number, y: number,\n deltaX: number, deltaY: number,\n lastX: number, lastY: number,\n};\n\nexport type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;\n\nexport type ControlPosition = {x: number, y: number};\nexport type PositionOffsetControlPosition = {x: number|string, y: number|string};\n\nexport type DraggableCoreProps = {\n allowAnyClick: boolean,\n cancel: string,\n children: ReactElement<any>,\n disabled: boolean,\n enableUserSelectHack: boolean,\n offsetParent: HTMLElement,\n grid: [number, number],\n handle: string,\n onStart: DraggableEventHandler,\n onDrag: DraggableEventHandler,\n onStop: DraggableEventHandler,\n onMouseDown: (e: MouseEvent) => void,\n};\n\n//\n// Define <DraggableCore>.\n//\n// <DraggableCore> is for advanced usage of <Draggable>. It maintains minimal internal state so it can\n// work well with libraries that require more control over the element.\n//\n\nexport default class DraggableCore extends React.Component<DraggableCoreProps, DraggableCoreState> {\n\n static displayName = 'DraggableCore';\n\n static propTypes = {\n /**\n * `allowAnyClick` allows dragging using any mouse button.\n * By default, we only accept the left button.\n *\n * Defaults to `false`.\n */\n allowAnyClick: PropTypes.bool,\n\n /**\n * `disabled`, if true, stops the <Draggable> from dragging. All handlers,\n * with the exception of `onMouseDown`, will not fire.\n */\n disabled: PropTypes.bool,\n\n /**\n * By default, we add 'user-select:none' attributes to the document body\n * to prevent ugly text selection during drag. If this is causing problems\n * for your app, set this to `false`.\n */\n enableUserSelectHack: PropTypes.bool,\n\n /**\n * `offsetParent`, if set, uses the passed DOM node to compute drag offsets\n * instead of using the parent node.\n */\n offsetParent: function(props: DraggableCoreProps, propName: $Keys<DraggableCoreProps>) {\n if (props[propName] && props[propName].nodeType !== 1) {\n throw new Error('Draggable\\'s offsetParent must be a DOM Node.');\n }\n },\n\n /**\n * `grid` specifies the x and y that dragging should snap to.\n */\n grid: PropTypes.arrayOf(PropTypes.number),\n \n /**\n * `scale` specifies the scale of the area you are dragging inside of. It allows\n * the drag deltas to scale correctly with how far zoomed in/out you are.\n */\n scale: PropTypes.number,\n\n /**\n * `handle` specifies a selector to be used as the handle that initiates drag.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable handle=\".handle\">\n * <div>\n * <div className=\"handle\">Click me to drag</div>\n * <div>This is some other content</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n handle: PropTypes.string,\n\n /**\n * `cancel` specifies a selector to be used to prevent drag initialization.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return(\n * <Draggable cancel=\".cancel\">\n * <div>\n * <div className=\"cancel\">You can't drag from here</div>\n * <div>Dragging here works fine</div>\n * </div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n cancel: PropTypes.string,\n\n /**\n * Called when dragging starts.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onStart: PropTypes.func,\n\n /**\n * Called while dragging.\n * If this function returns the boolean false, dragging will be canceled.\n */\n onDrag: PropTypes.func,\n\n /**\n * Called when dragging stops.\n * If this function returns the boolean false, the drag will remain active.\n */\n onStop: PropTypes.func,\n\n /**\n * A workaround option which can be passed if onMouseDown needs to be accessed,\n * since it'll always be blocked (as there is internal use of onMouseDown)\n */\n onMouseDown: PropTypes.func,\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n allowAnyClick: false, // by default only accept left click\n cancel: null,\n disabled: false,\n enableUserSelectHack: true,\n offsetParent: null,\n handle: null,\n grid: null,\n transform: null,\n onStart: function(){},\n onDrag: function(){},\n onStop: function(){},\n onMouseDown: function(){}\n };\n\n state = {\n dragging: false,\n // Used while dragging to determine deltas.\n lastX: NaN, lastY: NaN,\n touchIdentifier: null\n };\n\n componentWillUnmount() {\n // Remove any leftover event handlers. Remove both touch and mouse handlers in case\n // some browser quirk caused a touch event to fire during a mouse move, or vice versa.\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n const {ownerDocument} = thisNode;\n removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag);\n removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);\n removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop);\n if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument);\n }\n }\n\n handleDragStart: EventHandler<MouseTouchEvent> = (e) => {\n // Make it possible to attach event handlers on top of this one.\n this.props.onMouseDown(e);\n\n // Only accept left-clicks.\n if (!this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;\n\n // Get nodes. Be sure to grab relative document (could be iframed)\n const thisNode = ReactDOM.findDOMNode(this);\n if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {\n throw new Error('<DraggableCore> not mounted on DragStart!');\n }\n const {ownerDocument} = thisNode;\n\n // Short circuit if handle or cancel prop was provided and selector doesn't match.\n if (this.props.disabled ||\n (!(e.target instanceof ownerDocument.defaultView.Node)) ||\n (this.props.handle && !matchesSelectorAndParentsTo(e.target, this.props.handle, thisNode)) ||\n (this.props.cancel && matchesSelectorAndParentsTo(e.target, this.props.cancel, thisNode))) {\n return;\n }\n\n // Set touch identifier in component state if this is a touch event. This allows us to\n // distinguish between individual touches on multitouch screens by identifying which\n // touchpoint was set to this element.\n const touchIdentifier = getTouchIdentifier(e);\n this.setState({touchIdentifier});\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, touchIdentifier, this);\n if (position == null) return; // not possible but satisfies flow\n const {x, y} = position;\n\n // Create an event object with all the data parents need to make a decision here.\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDragStart: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, cancel.\n log('calling', this.props.onStart);\n const shouldUpdate = this.props.onStart(e, coreEvent);\n if (shouldUpdate === false) return;\n\n // Add a style to the body to disable user-select. This prevents text from\n // being selected all over the page.\n if (this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument);\n\n // Initiate dragging. Set the current x and y as offsets\n // so we know how much we've moved during the drag. This allows us\n // to drag elements around even if they have been moved, without issue.\n this.setState({\n dragging: true,\n\n lastX: x,\n lastY: y\n });\n\n // Add events to the document directly so we catch when the user's mouse/touch moves outside of\n // this element. We use different events depending on whether or not we have detected that this\n // is a touch-capable device.\n addEvent(ownerDocument, dragEventFor.move, this.handleDrag);\n addEvent(ownerDocument, dragEventFor.stop, this.handleDragStop);\n };\n\n handleDrag: EventHandler<MouseTouchEvent> = (e) => {\n\n // Prevent scrolling on mobile devices, like ipad/iphone.\n if (e.type === 'touchmove') e.preventDefault();\n\n // Get the current drag point from the event. This is used as the offset.\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n let {x, y} = position;\n\n // Snap to grid if prop has been provided\n if (Array.isArray(this.props.grid)) {\n let deltaX = x - this.state.lastX, deltaY = y - this.state.lastY;\n [deltaX, deltaY] = snapToGrid(this.props.grid, deltaX, deltaY);\n if (!deltaX && !deltaY) return; // skip useless drag\n x = this.state.lastX + deltaX, y = this.state.lastY + deltaY;\n }\n\n const coreEvent = createCoreData(this, x, y);\n\n log('DraggableCore: handleDrag: %j', coreEvent);\n\n // Call event handler. If it returns explicit false, trigger end.\n const shouldUpdate = this.props.onDrag(e, coreEvent);\n if (shouldUpdate === false) {\n try {\n // $FlowIgnore\n this.handleDragStop(new MouseEvent('mouseup'));\n } catch (err) {\n // Old browsers\n const event = ((document.createEvent('MouseEvents'): any): MouseTouchEvent);\n // I see why this insanity was deprecated\n // $FlowIgnore\n event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);\n this.handleDragStop(event);\n }\n return;\n }\n\n this.setState({\n lastX: x,\n lastY: y\n });\n };\n\n handleDragStop: EventHandler<MouseTouchEvent> = (e) => {\n if (!this.state.dragging) return;\n\n const position = getControlPosition(e, this.state.touchIdentifier, this);\n if (position == null) return;\n const {x, y} = position;\n const coreEvent = createCoreData(this, x, y);\n\n const thisNode = ReactDOM.findDOMNode(this);\n if (thisNode) {\n // Remove user-select hack\n if (this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument);\n }\n\n log('DraggableCore: handleDragStop: %j', coreEvent);\n\n // Reset the el.\n this.setState({\n dragging: false,\n lastX: NaN,\n lastY: NaN\n });\n\n // Call event handler\n this.props.onStop(e, coreEvent);\n\n if (thisNode) {\n // Remove event handlers\n log('DraggableCore: Removing handlers');\n removeEvent(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);\n removeEvent(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);\n }\n };\n\n onMouseDown: EventHandler<MouseTouchEvent> = (e) => {\n dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse\n\n return this.handleDragStart(e);\n };\n\n onMouseUp: EventHandler<MouseTouchEvent> = (e) => {\n dragEventFor = eventsFor.mouse;\n\n return this.handleDragStop(e);\n };\n\n // Same as onMouseDown (start drag), but now consider this a touch device.\n onTouchStart: EventHandler<MouseTouchEvent> = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStart(e);\n };\n\n onTouchEnd: EventHandler<MouseTouchEvent> = (e) => {\n // We're on a touch device now, so change the event handlers\n dragEventFor = eventsFor.touch;\n\n return this.handleDragStop(e);\n };\n\n render() {\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return React.cloneElement(React.Children.only(this.props.children), {\n style: styleHacks(this.props.children.props.style),\n\n // Note: mouseMove handler is attached to document so it will still function\n // when the user drags quickly and leaves the bounds of the element.\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n onMouseUp: this.onMouseUp,\n onTouchEnd: this.onTouchEnd\n });\n }\n}\n","// @flow\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport ReactDOM from 'react-dom';\nimport classNames from 'classnames';\nimport {createCSSTransform, createSVGTransform} from './utils/domFns';\nimport {canDragX, canDragY, createDraggableData, getBoundPosition} from './utils/positionFns';\nimport {dontSetMe} from './utils/shims';\nimport DraggableCore from './DraggableCore';\nimport type {ControlPosition, PositionOffsetControlPosition, DraggableBounds, DraggableCoreProps} from './DraggableCore';\nimport log from './utils/log';\nimport type {DraggableEventHandler} from './utils/types';\nimport type {Element as ReactElement} from 'react';\n\ntype DraggableState = {\n dragging: boolean,\n dragged: boolean,\n x: number, y: number,\n slackX: number, slackY: number,\n isElementSVG: boolean\n};\n\nexport type DraggableProps = {\n ...$Exact<DraggableCoreProps>,\n axis: 'both' | 'x' | 'y' | 'none',\n bounds: DraggableBounds | string | false,\n defaultClassName: string,\n defaultClassNameDragging: string,\n defaultClassNameDragged: string,\n defaultPosition: ControlPosition,\n positionOffset: PositionOffsetControlPosition,\n position: ControlPosition,\n scale: number\n};\n\n//\n// Define <Draggable>\n//\n\nexport default class Draggable extends React.Component<DraggableProps, DraggableState> {\n\n static displayName = 'Draggable';\n\n static propTypes = {\n // Accepts all props <DraggableCore> accepts.\n ...DraggableCore.propTypes,\n\n /**\n * `axis` determines which axis the draggable can move.\n *\n * Note that all callbacks will still return data as normal. This only\n * controls flushing to the DOM.\n *\n * 'both' allows movement horizontally and vertically.\n * 'x' limits movement to horizontal axis.\n * 'y' limits movement to vertical axis.\n * 'none' limits all movement.\n *\n * Defaults to 'both'.\n */\n axis: PropTypes.oneOf(['both', 'x', 'y', 'none']),\n\n /**\n * `bounds` determines the range of movement available to the element.\n * Available values are:\n *\n * 'parent' restricts movement within the Draggable's parent node.\n *\n * Alternatively, pass an object with the following properties, all of which are optional:\n *\n * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}\n *\n * All values are in px.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable bounds={{right: 300, bottom: 300}}>\n * <div>Content</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n bounds: PropTypes.oneOfType([\n PropTypes.shape({\n left: PropTypes.number,\n right: PropTypes.number,\n top: PropTypes.number,\n bottom: PropTypes.number\n }),\n PropTypes.string,\n PropTypes.oneOf([false])\n ]),\n\n defaultClassName: PropTypes.string,\n defaultClassNameDragging: PropTypes.string,\n defaultClassNameDragged: PropTypes.string,\n\n /**\n * `defaultPosition` specifies the x and y that the dragged item should start at\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable defaultPosition={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n defaultPosition: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n positionOffset: PropTypes.shape({\n x: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n y: PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n }),\n\n /**\n * `position`, if present, defines the current position of the element.\n *\n * This is similar to how form elements in React work - if no `position` is supplied, the component\n * is uncontrolled.\n *\n * Example:\n *\n * ```jsx\n * let App = React.createClass({\n * render: function () {\n * return (\n * <Draggable position={{x: 25, y: 25}}>\n * <div>I start with transformX: 25px and transformY: 25px;</div>\n * </Draggable>\n * );\n * }\n * });\n * ```\n */\n position: PropTypes.shape({\n x: PropTypes.number,\n y: PropTypes.number\n }),\n\n /**\n * These properties should be defined on the child, not here.\n */\n className: dontSetMe,\n style: dontSetMe,\n transform: dontSetMe\n };\n\n static defaultProps = {\n ...DraggableCore.defaultProps,\n axis: 'both',\n bounds: false,\n defaultClassName: 'react-draggable',\n defaultClassNameDragging: 'react-draggable-dragging',\n defaultClassNameDragged: 'react-draggable-dragged',\n defaultPosition: {x: 0, y: 0},\n position: null,\n scale: 1\n };\n\n constructor(props: DraggableProps) {\n super(props);\n\n this.state = {\n // Whether or not we are currently dragging.\n dragging: false,\n\n // Whether or not we have been dragged before.\n dragged: false,\n\n // Current transform x and y.\n x: props.position ? props.position.x : props.defaultPosition.x,\n y: props.position ? props.position.y : props.defaultPosition.y,\n\n // Used for compensating for out-of-bounds drags\n slackX: 0, slackY: 0,\n\n // Can only determine if SVG after mounting\n isElementSVG: false\n };\n\n if (props.position && !(props.onDrag || props.onStop)) {\n // eslint-disable-next-line no-console\n console.warn('A `position` was applied to this <Draggable>, without drag handlers. This will make this ' +\n 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' +\n '`position` of this element.');\n }\n }\n\n componentDidMount() {\n // Check to see if the element passed is an instanceof SVGElement\n if(typeof window.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof window.SVGElement) {\n this.setState({ isElementSVG: true });\n }\n }\n\n componentWillReceiveProps(nextProps: Object) {\n // Set x/y if position has changed\n if (nextProps.position &&\n (!this.props.position ||\n nextProps.position.x !== this.props.position.x ||\n nextProps.position.y !== this.props.position.y\n )\n ) {\n this.setState({ x: nextProps.position.x, y: nextProps.position.y });\n }\n }\n\n componentWillUnmount() {\n this.setState({dragging: false}); // prevents invariant if unmounted while dragging\n }\n\n onDragStart: DraggableEventHandler = (e, coreData) => {\n log('Draggable: onDragStart: %j', coreData);\n\n // Short-circuit if user's callback killed it.\n const shouldStart = this.props.onStart(e, createDraggableData(this, coreData));\n // Kills start event on core as well, so move handlers are never bound.\n if (shouldStart === false) return false;\n\n this.setState({dragging: true, dragged: true});\n };\n\n onDrag: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n log('Draggable: onDrag: %j', coreData);\n\n const uiData = createDraggableData(this, coreData);\n\n const newState: $Shape<DraggableState> = {\n x: uiData.x,\n y: uiData.y\n };\n\n // Keep within bounds.\n if (this.props.bounds) {\n // Save original x and y.\n const {x, y} = newState;\n\n // Add slack to the values used to calculate bound position. This will ensure that if\n // we start removing slack, the element won't react to it right away until it's been\n // completely removed.\n newState.x += this.state.slackX;\n newState.y += this.state.slackY;\n\n // Get bound position. This will ceil/floor the x and y within the boundaries.\n const [newStateX, newStateY] = getBoundPosition(this, newState.x, newState.y);\n newState.x = newStateX;\n newState.y = newStateY;\n\n // Recalculate slack by noting how much was shaved by the boundPosition handler.\n newState.slackX = this.state.slackX + (x - newState.x);\n newState.slackY = this.state.slackY + (y - newState.y);\n\n // Update the event we fire to reflect what really happened after bounds took effect.\n uiData.x = newState.x;\n uiData.y = newState.y;\n uiData.deltaX = newState.x - this.state.x;\n uiData.deltaY = newState.y - this.state.y;\n }\n\n // Short-circuit if user's callback killed it.\n const shouldUpdate = this.props.onDrag(e, uiData);\n if (shouldUpdate === false) return false;\n\n this.setState(newState);\n };\n\n onDragStop: DraggableEventHandler = (e, coreData) => {\n if (!this.state.dragging) return false;\n\n // Short-circuit if user's callback killed it.\n const shouldStop = this.props.onStop(e, createDraggableData(this, coreData));\n if (shouldStop === false) return false;\n\n log('Draggable: onDragStop: %j', coreData);\n\n const newState: $Shape<DraggableState> = {\n dragging: false,\n slackX: 0,\n slackY: 0\n };\n\n // If this is a controlled component, the result of this operation will be to\n // revert back to the old position. We expect a handler on `onDragStop`, at the least.\n const controlled = Boolean(this.props.position);\n if (controlled) {\n const {x, y} = this.props.position;\n newState.x = x;\n newState.y = y;\n }\n\n this.setState(newState);\n };\n\n render(): ReactElement<any> {\n let style = {}, svgTransform = null;\n\n // If this is controlled, we don't want to move it - unless it's dragging.\n const controlled = Boolean(this.props.position);\n const draggable = !controlled || this.state.dragging;\n\n const position = this.props.position || this.props.defaultPosition;\n const transformOpts = {\n // Set left if horizontal drag is enabled\n x: canDragX(this) && draggable ?\n this.state.x :\n position.x,\n\n // Set top if vertical drag is enabled\n y: canDragY(this) && draggable ?\n this.state.y :\n position.y\n };\n\n // If this element was SVG, we use the `transform` attribute.\n if (this.state.isElementSVG) {\n svgTransform = createSVGTransform(transformOpts, this.props.positionOffset);\n } else {\n // Add a CSS transform to move the element around. This allows us to move the element around\n // without worrying about whether or not it is relatively or absolutely positioned.\n // If the item you are dragging already has a transform set, wrap it in a <span> so <Draggable>\n // has a clean slate.\n style = createCSSTransform(transformOpts, this.props.positionOffset);\n }\n\n const {\n defaultClassName,\n defaultClassNameDragging,\n defaultClassNameDragged\n } = this.props;\n\n const children = React.Children.only(this.props.children);\n\n // Mark with class while dragging\n const className = classNames((children.props.className || ''), defaultClassName, {\n [defaultClassNameDragging]: this.state.dragging,\n [defaultClassNameDragged]: this.state.dragged\n });\n\n // Reuse the child provided\n // This makes it flexible to use whatever element is wanted (div, ul, etc)\n return (\n <DraggableCore {...this.props} onStart={this.onDragStart} onDrag={this.onDrag} onStop={this.onDragStop}>\n {React.cloneElement(children, {\n className: className,\n style: {...children.props.style, ...style},\n transform: svgTransform\n })}\n </DraggableCore>\n );\n }\n}\n","import Draggable from './Draggable';\nimport DraggableCore from './DraggableCore';\n\n// Previous versions of this lib exported <Draggable> as the root export. As to not break\n// them, or TypeScript, we export *both* as the root and as 'default'.\n// See https://github.com/mzabriskie/react-draggable/pull/254\n// and https://github.com/mzabriskie/react-draggable/issues/266\nDraggable.default = Draggable;\nDraggable.DraggableCore = DraggableCore;\n\nexport default Draggable;\n"],"names":["makeEmptyFunction","arg","emptyFunction","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","this","thatReturnsArgument","condition","format","a","b","c","d","e","f","error","undefined","Error","args","argIndex","replace","name","framesToPop","getOwnPropertySymbols","Object","hasOwnProperty","prototype","propIsEnumerable","propertyIsEnumerable","assign","test1","String","getOwnPropertyNames","test2","i","fromCharCode","map","n","join","test3","split","forEach","letter","keys","err","shouldUseNative","module","shim","props","propName","componentName","location","propFullName","secret","ReactPropTypesSecret","invariant","getShim","isRequired","ReactPropTypes","array","bool","func","number","object","string","symbol","any","arrayOf","element","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","require$$1","hasOwn","classNames","classes","arguments","length","argType","push","Array","isArray","apply","key","call","exports","window","findInArray","callback","isFunction","toString","isNum","num","isNaN","int","parseInt","dontSetMe","prefixes","browserPrefixToKey","prop","prefix","str","out","shouldCapitalize","toUpperCase","kebabToTitleCase","document","style","documentElement","getPrefix","matchesSelectorFunc","matchesSelector","el","selector","method","matchesSelectorAndParentsTo","baseNode","parentNode","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","getTranslation","positionOffset","unitSuffix","translation","x","y","addUserSelectStyles","doc","className","styleEl","getElementById","createElement","type","id","innerHTML","getElementsByTagName","appendChild","body","classList","add","match","RegExp","removeUserSelectStyles","remove","selection","empty","getSelection","removeAllRanges","getBoundPosition","draggable","bounds","left","top","right","bottom","cloneBounds","findDOMNode","ownerDocument","ownerWindow","defaultView","boundNode","querySelector","HTMLElement","nodeStyle","getComputedStyle","boundNodeStyle","offsetLeft","paddingLeft","marginLeft","offsetTop","paddingTop","marginTop","width","clientWidth","computedStyle","paddingRight","innerWidth","borderLeftWidth","borderRightWidth","outerWidth","marginRight","height","clientHeight","paddingBottom","innerHeight","borderTopWidth","borderBottomWidth","outerHeight","marginBottom","Math","min","max","getControlPosition","touchIdentifier","draggableCore","touchObj","identifier","targetTouches","t","changedTouches","getTouch","evt","offsetParent","offsetParentRect","getBoundingClientRect","clientX","scrollLeft","clientY","scrollTop","offsetXYFromParent","createCoreData","state","isStart","lastX","deltaY","lastY","createDraggableData","coreData","scale","deltaX","ReactDOM","eventsFor","dragEventFor","mouse","DraggableCore","NaN","handleDragStart","onMouseDown","_this","allowAnyClick","button","thisNode","disabled","target","Node","handle","cancel","getTouchIdentifier","setState","position","coreEvent","onStart","enableUserSelectHack","move","handleDrag","stop","handleDragStop","preventDefault","grid","pendingX","pendingY","round","onDrag","MouseEvent","createEvent","initMouseEvent","dragging","onStop","onMouseUp","onTouchStart","touch","onTouchEnd","React","cloneElement","Children","only","children","childStyle","styleHacks","Component","displayName","propTypes","nodeType","defaultProps","Draggable","onDragStart","dragged","uiData","newState","slackX","slackY","newStateX","newStateY","onDragStop","Boolean","defaultPosition","warn","SVGElement","isElementSVG","nextProps","controlPos","svgTransform","transformOpts","axis","canDragX","canDragY","browserPrefix","createCSSTransform","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","default"],"mappings":"uUAWA,SAASA,EAAkBC,GACzB,OAAO,WACL,OAAOA,6FASX,IAAIC,EAAgB,aAEpBA,EAAcC,YAAcH,EAC5BE,EAAcE,iBAAmBJ,GAAkB,GACnDE,EAAcG,gBAAkBL,GAAkB,GAClDE,EAAcI,gBAAkBN,EAAkB,MAClDE,EAAcK,gBAAkB,WAC9B,OAAOC,MAETN,EAAcO,oBAAsB,SAAUR,GAC5C,OAAOA,GAGT,MAAiBC,ECiBjB,MArBA,SAAmBQ,EAAWC,EAAQC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,GAGnD,IAAKP,EAAW,CACd,IAAIQ,EACJ,QAAeC,IAAXR,EACFO,EAAQ,IAAIE,MAAM,qIACb,CACL,IAAIC,GAAQT,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,GACvBK,EAAW,GACfJ,EAAQ,IAAIE,MAAMT,EAAOY,QAAQ,MAAO,WACtC,OAAOF,EAAKC,SAERE,KAAO,sBAIf,MADAN,EAAMO,YAAc,EACdP,ICxCNQ,EAAwBC,OAAOD,sBAC/BE,EAAiBD,OAAOE,UAAUD,eAClCE,EAAmBH,OAAOE,UAAUE,sBAUxC,WACC,IACC,IAAKJ,OAAOK,OACX,OAAO,EAMR,IAAIC,EAAQ,IAAIC,OAAO,OAEvB,GADAD,EAAM,GAAK,KACkC,MAAzCN,OAAOQ,oBAAoBF,GAAO,GACrC,OAAO,EAKR,IADA,IAAIG,KACKC,EAAI,EAAGA,EAAI,GAAIA,IACvBD,EAAM,IAAMF,OAAOI,aAAaD,IAAMA,EAK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