diff --git a/CHANGELOG.md b/CHANGELOG.md index 98f0359a..345a25c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,3 +42,7 @@ - Add `"browser"` config to package.json for browserify imports (fix #45). - Remove unnecessary `emptyFunction` and `React.addons.classSet` imports. + +### 0.4.3 (Apr 30, 2015) + +- Fix React.addons error caused by faulty test. diff --git a/bower.json b/bower.json index dbfba7cb..e54eec7f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "0.4.2", + "version": "0.4.3", "homepage": "https://github.com/mzabriskie/react-draggable", "authors": [ "Matt Zabriskie" diff --git a/dist/react-draggable.js b/dist/react-draggable.js index aa89c398..e980bbac 100644 --- a/dist/react-draggable.js +++ b/dist/react-draggable.js @@ -66,6 +66,7 @@ return /******/ (function(modules) { // webpackBootstrap /** @jsx React.DOM */ var React = __webpack_require__(2); var emptyFunction = function(){}; + var cloneWithProps = __webpack_require__(3); function createUIEvent(draggable) { return { @@ -516,7 +517,7 @@ return /******/ (function(modules) { // webpackBootstrap // Reuse the child provided // This makes it flexible to use whatever element is wanted (div, ul, etc) - return React.addons.cloneWithProps(React.Children.only(this.props.children), { + return cloneWithProps(React.Children.only(this.props.children), { style: style, className: className, @@ -539,6 +540,973 @@ return /******/ (function(modules) { // webpackBootstrap module.exports = __WEBPACK_EXTERNAL_MODULE_2__; +/***/ }, +/* 3 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks static-only + * @providesModule cloneWithProps + */ + + 'use strict'; + + var ReactElement = __webpack_require__(4); + var ReactPropTransferer = __webpack_require__(5); + + var keyOf = __webpack_require__(6); + var warning = __webpack_require__(7); + + var CHILDREN_PROP = keyOf({children: null}); + + /** + * Sometimes you want to change the props of a child passed to you. Usually + * this is to add a CSS class. + * + * @param {ReactElement} child child element you'd like to clone + * @param {object} props props you'd like to modify. className and style will be + * merged automatically. + * @return {ReactElement} a clone of child with props merged in. + */ + function cloneWithProps(child, props) { + if ("production" !== process.env.NODE_ENV) { + ("production" !== process.env.NODE_ENV ? warning( + !child.ref, + 'You are calling cloneWithProps() on a child with a ref. This is ' + + 'dangerous because you\'re creating a new child which will not be ' + + 'added as a ref to its parent.' + ) : null); + } + + var newProps = ReactPropTransferer.mergeProps(props, child.props); + + // Use `child.props.children` if it is provided. + if (!newProps.hasOwnProperty(CHILDREN_PROP) && + child.props.hasOwnProperty(CHILDREN_PROP)) { + newProps.children = child.props.children; + } + + // The current API doesn't retain _owner and _context, which is why this + // doesn't use ReactElement.cloneAndReplaceProps. + return ReactElement.createElement(child.type, newProps); + } + + module.exports = cloneWithProps; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8))) + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactElement + */ + + 'use strict'; + + var ReactContext = __webpack_require__(9); + var ReactCurrentOwner = __webpack_require__(10); + + var assign = __webpack_require__(11); + var warning = __webpack_require__(7); + + var RESERVED_PROPS = { + key: true, + ref: true + }; + + /** + * Warn for mutations. + * + * @internal + * @param {object} object + * @param {string} key + */ + function defineWarningProperty(object, key) { + Object.defineProperty(object, key, { + + configurable: false, + enumerable: true, + + get: function() { + if (!this._store) { + return null; + } + return this._store[key]; + }, + + set: function(value) { + ("production" !== process.env.NODE_ENV ? warning( + false, + 'Don\'t set the %s property of the React element. Instead, ' + + 'specify the correct value when initially creating the element.', + key + ) : null); + this._store[key] = value; + } + + }); + } + + /** + * This is updated to true if the membrane is successfully created. + */ + var useMutationMembrane = false; + + /** + * Warn for mutations. + * + * @internal + * @param {object} element + */ + function defineMutationMembrane(prototype) { + try { + var pseudoFrozenProperties = { + props: true + }; + for (var key in pseudoFrozenProperties) { + defineWarningProperty(prototype, key); + } + useMutationMembrane = true; + } catch (x) { + // IE will fail on defineProperty + } + } + + /** + * Base constructor for all React elements. This is only used to make this + * work with a dynamic instanceof check. Nothing should live on this prototype. + * + * @param {*} type + * @param {string|object} ref + * @param {*} key + * @param {*} props + * @internal + */ + var ReactElement = function(type, key, ref, owner, context, props) { + // Built-in properties that belong on the element + this.type = type; + this.key = key; + this.ref = ref; + + // Record the component responsible for creating this element. + this._owner = owner; + + // TODO: Deprecate withContext, and then the context becomes accessible + // through the owner. + this._context = context; + + if ("production" !== process.env.NODE_ENV) { + // The validation flag and props are currently mutative. We put them on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + this._store = {props: props, originalProps: assign({}, props)}; + + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + try { + Object.defineProperty(this._store, 'validated', { + configurable: false, + enumerable: false, + writable: true + }); + } catch (x) { + } + this._store.validated = false; + + // We're not allowed to set props directly on the object so we early + // return and rely on the prototype membrane to forward to the backing + // store. + if (useMutationMembrane) { + Object.freeze(this); + return; + } + } + + this.props = props; + }; + + // We intentionally don't expose the function on the constructor property. + // ReactElement should be indistinguishable from a plain object. + ReactElement.prototype = { + _isReactElement: true + }; + + if ("production" !== process.env.NODE_ENV) { + defineMutationMembrane(ReactElement.prototype); + } + + ReactElement.createElement = function(type, config, children) { + var propName; + + // Reserved names are extracted + var props = {}; + + var key = null; + var ref = null; + + if (config != null) { + ref = config.ref === undefined ? null : config.ref; + key = config.key === undefined ? null : '' + config.key; + // Remaining properties are added to a new props object + for (propName in config) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (typeof props[propName] === 'undefined') { + props[propName] = defaultProps[propName]; + } + } + } + + return new ReactElement( + type, + key, + ref, + ReactCurrentOwner.current, + ReactContext.current, + props + ); + }; + + ReactElement.createFactory = function(type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. .type === Foo.type. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; + }; + + ReactElement.cloneAndReplaceProps = function(oldElement, newProps) { + var newElement = new ReactElement( + oldElement.type, + oldElement.key, + oldElement.ref, + oldElement._owner, + oldElement._context, + newProps + ); + + if ("production" !== process.env.NODE_ENV) { + // If the key on the original is valid, then the clone is valid + newElement._store.validated = oldElement._store.validated; + } + return newElement; + }; + + ReactElement.cloneElement = function(element, config, children) { + var propName; + + // Original props are copied + var props = assign({}, element.props); + + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + + // Owner will be preserved, unless ref is overridden + var owner = element._owner; + + if (config != null) { + if (config.ref !== undefined) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (config.key !== undefined) { + key = '' + config.key; + } + // Remaining properties override existing props + for (propName in config) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return new ReactElement( + element.type, + key, + ref, + owner, + element._context, + props + ); + }; + + /** + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final + */ + ReactElement.isValidElement = function(object) { + // ReactTestUtils is often used outside of beforeEach where as React is + // within it. This leads to two different instances of React on the same + // page. To identify a element from a different React instance we use + // a flag instead of an instanceof check. + var isElement = !!(object && object._isReactElement); + // if (isElement && !(object instanceof ReactElement)) { + // This is an indicator that you're using multiple versions of React at the + // same time. This will screw with ownership and stuff. Fix it, please. + // TODO: We could possibly warn here. + // } + return isElement; + }; + + module.exports = ReactElement; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8))) + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPropTransferer + */ + + 'use strict'; + + var assign = __webpack_require__(11); + var emptyFunction = __webpack_require__(12); + var joinClasses = __webpack_require__(13); + + /** + * Creates a transfer strategy that will merge prop values using the supplied + * `mergeStrategy`. If a prop was previously unset, this just sets it. + * + * @param {function} mergeStrategy + * @return {function} + */ + function createTransferStrategy(mergeStrategy) { + return function(props, key, value) { + if (!props.hasOwnProperty(key)) { + props[key] = value; + } else { + props[key] = mergeStrategy(props[key], value); + } + }; + } + + var transferStrategyMerge = createTransferStrategy(function(a, b) { + // `merge` overrides the first object's (`props[key]` above) keys using the + // second object's (`value`) keys. An object's style's existing `propA` would + // get overridden. Flip the order here. + return assign({}, b, a); + }); + + /** + * Transfer strategies dictate how props are transferred by `transferPropsTo`. + * NOTE: if you add any more exceptions to this list you should be sure to + * update `cloneWithProps()` accordingly. + */ + var TransferStrategies = { + /** + * Never transfer `children`. + */ + children: emptyFunction, + /** + * Transfer the `className` prop by merging them. + */ + className: createTransferStrategy(joinClasses), + /** + * Transfer the `style` prop (which is an object) by merging them. + */ + style: transferStrategyMerge + }; + + /** + * Mutates the first argument by transferring the properties from the second + * argument. + * + * @param {object} props + * @param {object} newProps + * @return {object} + */ + function transferInto(props, newProps) { + for (var thisKey in newProps) { + if (!newProps.hasOwnProperty(thisKey)) { + continue; + } + + var transferStrategy = TransferStrategies[thisKey]; + + if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) { + transferStrategy(props, thisKey, newProps[thisKey]); + } else if (!props.hasOwnProperty(thisKey)) { + props[thisKey] = newProps[thisKey]; + } + } + return props; + } + + /** + * ReactPropTransferer are capable of transferring props to another component + * using a `transferPropsTo` method. + * + * @class ReactPropTransferer + */ + var ReactPropTransferer = { + + /** + * Merge two props objects using TransferStrategies. + * + * @param {object} oldProps original props (they take precedence) + * @param {object} newProps new props to merge in + * @return {object} a new object containing both sets of props merged. + */ + mergeProps: function(oldProps, newProps) { + return transferInto(assign({}, oldProps), newProps); + } + + }; + + module.exports = ReactPropTransferer; + + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyOf + */ + + /** + * Allows extraction of a minified key. Let's the build system minify keys + * without loosing the ability to dynamically use key strings as values + * themselves. Pass in an object with a single key/val pair and it will return + * you the string key of that single record. Suppose you want to grab the + * value for a key 'className' inside of an object. Key/val minification may + * have aliased that key to be 'xa12'. keyOf({className: null}) will return + * 'xa12' in that case. Resolve keys you want to use once at startup time, then + * reuse those resolutions. + */ + var keyOf = function(oneKeyObj) { + var key; + for (key in oneKeyObj) { + if (!oneKeyObj.hasOwnProperty(key)) { + continue; + } + return key; + } + return null; + }; + + + module.exports = keyOf; + + +/***/ }, +/* 7 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule warning + */ + + "use strict"; + + var emptyFunction = __webpack_require__(12); + + /** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + + var warning = emptyFunction; + + if ("production" !== process.env.NODE_ENV) { + warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}); + console.warn(message); + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; + } + + module.exports = warning; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8))) + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + // shim for using process in browser + + var process = module.exports = {}; + + process.nextTick = (function () { + var canSetImmediate = typeof window !== 'undefined' + && window.setImmediate; + var canMutationObserver = typeof window !== 'undefined' + && window.MutationObserver; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canSetImmediate) { + return function (f) { return window.setImmediate(f) }; + } + + var queue = []; + + if (canMutationObserver) { + var hiddenDiv = document.createElement("div"); + var observer = new MutationObserver(function () { + var queueList = queue.slice(); + queue.length = 0; + queueList.forEach(function (fn) { + fn(); + }); + }); + + observer.observe(hiddenDiv, { attributes: true }); + + return function nextTick(fn) { + if (!queue.length) { + hiddenDiv.setAttribute('yes', 'no'); + } + queue.push(fn); + }; + } + + if (canPost) { + window.addEventListener('message', function (ev) { + var source = ev.source; + if ((source === window || source === null) && ev.data === 'process-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + + return function nextTick(fn) { + queue.push(fn); + window.postMessage('process-tick', '*'); + }; + } + + return function nextTick(fn) { + setTimeout(fn, 0); + }; + })(); + + process.title = 'browser'; + process.browser = true; + process.env = {}; + process.argv = []; + + function noop() {} + + process.on = noop; + process.addListener = noop; + process.once = noop; + process.off = noop; + process.removeListener = noop; + process.removeAllListeners = noop; + process.emit = noop; + + process.binding = function (name) { + throw new Error('process.binding is not supported'); + }; + + // TODO(shtylman) + process.cwd = function () { return '/' }; + process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); + }; + + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactContext + */ + + 'use strict'; + + var assign = __webpack_require__(11); + var emptyObject = __webpack_require__(14); + var warning = __webpack_require__(7); + + var didWarn = false; + + /** + * Keeps track of the current context. + * + * The context is automatically passed down the component ownership hierarchy + * and is accessible via `this.context` on ReactCompositeComponents. + */ + var ReactContext = { + + /** + * @internal + * @type {object} + */ + current: emptyObject, + + /** + * Temporarily extends the current context while executing scopedCallback. + * + * A typical use case might look like + * + * render: function() { + * var children = ReactContext.withContext({foo: 'foo'}, () => ( + * + * )); + * return
{children}
; + * } + * + * @param {object} newContext New context to merge into the existing context + * @param {function} scopedCallback Callback to run with the new context + * @return {ReactComponent|array} + */ + withContext: function(newContext, scopedCallback) { + if ("production" !== process.env.NODE_ENV) { + ("production" !== process.env.NODE_ENV ? warning( + didWarn, + 'withContext is deprecated and will be removed in a future version. ' + + 'Use a wrapper component with getChildContext instead.' + ) : null); + + didWarn = true; + } + + var result; + var previousContext = ReactContext.current; + ReactContext.current = assign({}, previousContext, newContext); + try { + result = scopedCallback(); + } finally { + ReactContext.current = previousContext; + } + return result; + } + + }; + + module.exports = ReactContext; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8))) + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactCurrentOwner + */ + + 'use strict'; + + /** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + * + * The depth indicate how many composite components are above this render level. + */ + var ReactCurrentOwner = { + + /** + * @internal + * @type {ReactComponent} + */ + current: null + + }; + + module.exports = ReactCurrentOwner; + + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Object.assign + */ + + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign + + 'use strict'; + + function assign(target, sources) { + if (target == null) { + throw new TypeError('Object.assign target cannot be null or undefined'); + } + + var to = Object(target); + var hasOwnProperty = Object.prototype.hasOwnProperty; + + for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) { + var nextSource = arguments[nextIndex]; + if (nextSource == null) { + continue; + } + + var from = Object(nextSource); + + // We don't currently support accessors nor proxies. Therefore this + // copy cannot throw. If we ever supported this then we must handle + // exceptions and side-effects. We don't support symbols so they won't + // be transferred. + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + } + + return to; + } + + module.exports = assign; + + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyFunction + */ + + function makeEmptyFunction(arg) { + return function() { + return arg; + }; + } + + /** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ + function emptyFunction() {} + + emptyFunction.thatReturns = makeEmptyFunction; + emptyFunction.thatReturnsFalse = makeEmptyFunction(false); + emptyFunction.thatReturnsTrue = makeEmptyFunction(true); + emptyFunction.thatReturnsNull = makeEmptyFunction(null); + emptyFunction.thatReturnsThis = function() { return this; }; + emptyFunction.thatReturnsArgument = function(arg) { return arg; }; + + module.exports = emptyFunction; + + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + /** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule joinClasses + * @typechecks static-only + */ + + 'use strict'; + + /** + * Combines multiple className strings into one. + * http://jsperf.com/joinclasses-args-vs-array + * + * @param {...?string} classes + * @return {string} + */ + function joinClasses(className/*, ... */) { + if (!className) { + className = ''; + } + var nextClass; + var argLength = arguments.length; + if (argLength > 1) { + for (var ii = 1; ii < argLength; ii++) { + nextClass = arguments[ii]; + if (nextClass) { + className = (className ? className + ' ' : '') + nextClass; + } + } + } + return className; + } + + module.exports = joinClasses; + + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + /* WEBPACK VAR INJECTION */(function(process) {/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyObject + */ + + "use strict"; + + var emptyObject = {}; + + if ("production" !== process.env.NODE_ENV) { + Object.freeze(emptyObject); + } + + module.exports = emptyObject; + + /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(8))) + /***/ } /******/ ]) }); diff --git a/dist/react-draggable.map b/dist/react-draggable.map index ce83e872..e5f6afb4 100644 --- a/dist/react-draggable.map +++ b/dist/react-draggable.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 300f832e840189067574","webpack:///./index.js","webpack:///./lib/draggable.js","webpack:///external \"React\""],"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,wC;;;;;;;ACtCA,OAAM,CAAC,OAAO,GAAG,mBAAO,CAAC,CAAiB,CAAC,CAAC;;;;;;;ACA5C,aAAY,CAAC;;AAEb,sBAAqB;AACrB,KAAI,KAAK,GAAG,mBAAO,CAAC,CAAO,CAAC,CAAC;AAC7B,KAAI,aAAa,GAAG,UAAU,EAAE,CAAC;;AAEjC,UAAS,aAAa,CAAC,SAAS,EAAE;EACjC,OAAO;GACN,QAAQ,EAAE;IACT,GAAG,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;IAC5B,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO;IAC7B;GACD,CAAC;AACH,EAAC;;AAED,UAAS,QAAQ,CAAC,SAAS,EAAE;EAC5B,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM;IACpC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,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AAC,IAAI,CAAC,IAAI,CAAC;;IAEf,SAAS,EAAE,IAAI,CAAC,aAAa;IAC7B,UAAU,EAAE,IAAI,CAAC,aAAa;IAC9B,CAAC,CAAC;GACH;EACD,CAAC,CAAC;;;;;;;ACrdH,gD","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/** WEBPACK FOOTER **\n ** webpack/bootstrap 300f832e840189067574\n **/","module.exports = require('./lib/draggable');\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","'use strict';\n\n/** @jsx React.DOM */\nvar React = require('react');\nvar emptyFunction = function(){};\n\nfunction createUIEvent(draggable) {\n\treturn {\n\t\tposition: {\n\t\t\ttop: draggable.state.clientY,\n\t\t\tleft: draggable.state.clientX\n\t\t}\n\t};\n}\n\nfunction canDragY(draggable) {\n\treturn draggable.props.axis === 'both' ||\n\t\t\tdraggable.props.axis === 'y';\n}\n\nfunction canDragX(draggable) {\n\treturn draggable.props.axis === 'both' ||\n\t\t\tdraggable.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, element = null; i < length, element = array[i]; i++) {\n if (callback.apply(callback, [element, i, array])) return element;\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\tif (!el) { return; }\n\tif (el.attachEvent) {\n\t\tel.attachEvent('on' + event, handler);\n\t} else if (el.addEventListener) {\n\t\tel.addEventListener(event, handler, true);\n\t} else {\n\t\tel['on' + event] = handler;\n\t}\n}\n\nfunction removeEvent(el, event, handler) {\n\tif (!el) { return; }\n\tif (el.detachEvent) {\n\t\tel.detachEvent('on' + event, handler);\n\t} else if (el.removeEventListener) {\n\t\tel.removeEventListener(event, handler, true);\n\t} else {\n\t\tel['on' + event] = null;\n\t}\n}\n\nmodule.exports = React.createClass({\n\tdisplayName: 'Draggable',\n\n\tpropTypes: {\n\t\t/**\n\t\t * `axis` determines which axis the draggable can move.\n\t\t *\n\t\t * 'both' allows movement horizontally and vertically.\n\t\t * 'x' limits movement to horizontal axis.\n\t\t * 'y' limits movement to vertical axis.\n\t\t *\n\t\t * Defaults to 'both'.\n\t\t */\n\t\taxis: React.PropTypes.oneOf(['both', 'x', 'y']),\n\n\t\t/**\n\t\t * `handle` specifies a selector to be used as the handle that initiates drag.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t \treturn (\n\t\t * \t \t \t\n\t\t * \t \t \t
\n\t\t * \t \t \t
Click me to drag
\n\t\t * \t \t \t
This is some other content
\n\t\t * \t \t \t
\n\t\t * \t \t\t
\n\t\t * \t \t);\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\thandle: React.PropTypes.string,\n\n\t\t/**\n\t\t * `cancel` specifies a selector to be used to prevent drag initialization.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t return(\n\t\t * \t \n\t\t * \t
\n\t\t * \t \t
You can't drag from here
\n\t\t *\t\t\t\t\t\t
Dragging here works fine
\n\t\t * \t
\n\t\t * \t
\n\t\t * \t );\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\tcancel: React.PropTypes.string,\n\n\t\t/**\n\t\t * `grid` specifies the x and y that dragging should snap to.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t return (\n\t\t * \t \n\t\t * \t
I snap to a 25 x 25 grid
\n\t\t * \t
\n\t\t * \t );\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\tgrid: React.PropTypes.arrayOf(React.PropTypes.number),\n\n\t\t/**\n\t\t * `start` specifies the x and y that the dragged item should start at\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t return (\n\t\t * \t \n\t\t * \t
I start with left: 25px; top: 25px;
\n\t\t * \t
\n\t\t * \t );\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\tstart: React.PropTypes.object,\n\n\t\t/**\n\t\t * `zIndex` specifies the zIndex to use while dragging.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t return (\n\t\t * \t \n\t\t * \t
I have a zIndex
\n\t\t * \t
\n\t\t * \t );\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\tzIndex: React.PropTypes.number,\n\n\t\t/**\n\t\t * Called when dragging starts.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```js\n\t\t *\tfunction (event, ui) {}\n\t\t * ```\n\t\t *\n\t\t * `event` is the Event that was triggered.\n\t\t * `ui` is an object:\n\t\t *\n\t\t * ```js\n\t\t *\t{\n\t\t *\t\tposition: {top: 0, left: 0}\n\t\t *\t}\n\t\t * ```\n\t\t */\n\t\tonStart: React.PropTypes.func,\n\n\t\t/**\n\t\t * Called while dragging.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```js\n\t\t *\tfunction (event, ui) {}\n\t\t * ```\n\t\t *\n\t\t * `event` is the Event that was triggered.\n\t\t * `ui` is an object:\n\t\t *\n\t\t * ```js\n\t\t *\t{\n\t\t *\t\tposition: {top: 0, left: 0}\n\t\t *\t}\n\t\t * ```\n\t\t */\n\t\tonDrag: React.PropTypes.func,\n\n\t\t/**\n\t\t * Called when dragging stops.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```js\n\t\t *\tfunction (event, ui) {}\n\t\t * ```\n\t\t *\n\t\t * `event` is the Event that was triggered.\n\t\t * `ui` is an object:\n\t\t *\n\t\t * ```js\n\t\t *\t{\n\t\t *\t\tposition: {top: 0, left: 0}\n\t\t *\t}\n\t\t * ```\n\t\t */\n\t\tonStop: React.PropTypes.func,\n\n\t\t/**\n\t\t * A workaround option which can be passed if onMouseDown needs to be accessed, since it'll always be blocked (due to that there's internal use of onMouseDown)\n\t\t *\n\t\t */\n\t\tonMouseDown: React.PropTypes.func\n\t},\n\n\tcomponentWillUnmount: function() {\n\t\t// Remove any leftover event handlers\n\t\tremoveEvent(window, dragEventFor['move'], this.handleDrag);\n\t\tremoveEvent(window, dragEventFor['end'], this.handleDragEnd);\n\t},\n\n\tgetDefaultProps: function () {\n\t\treturn {\n\t\t\taxis: 'both',\n\t\t\thandle: null,\n\t\t\tcancel: null,\n\t\t\tgrid: null,\n\t\t\tstart: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0\n\t\t\t},\n\t\t\tzIndex: NaN,\n\t\t\tonStart: emptyFunction,\n\t\t\tonDrag: emptyFunction,\n\t\t\tonStop: emptyFunction,\n\t\t\tonMouseDown: emptyFunction\n\t\t};\n\t},\n\n\tgetInitialState: function () {\n\t\treturn {\n\t\t\t// Whether or not currently dragging\n\t\t\tdragging: false,\n\n\t\t\t// Start top/left of this.getDOMNode()\n\t\t\tstartX: 0, startY: 0,\n\n\t\t\t// Offset between start top/left and mouse top/left\n\t\t\toffsetX: 0, offsetY: 0,\n\n\t\t\t// Current top/left of this.getDOMNode()\n\t\t\tclientX: this.props.start.x, clientY: this.props.start.y\n\t\t};\n\t},\n\n\thandleDragStart: 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\t\t// Make it possible to attach event handlers on top of this one\n\t\tthis.props.onMouseDown(e);\n\n\t\tvar node = this.getDOMNode();\n\n\t\t// Short circuit if handle or cancel prop was provided and selector doesn't match\n\t\tif ((this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n\t\t\t(this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n\t\t\treturn;\n\t\t}\n\n var dragPoint = getControlPosition(e);\n\n\t\t// Initiate dragging\n\t\tthis.setState({\n\t\t\tdragging: true,\n\t\t\toffsetX: parseInt(dragPoint.clientX, 10),\n\t\t\toffsetY: parseInt(dragPoint.clientY, 10),\n\t\t\tstartX: parseInt(node.style.left, 10) || 0,\n\t\t\tstartY: parseInt(node.style.top, 10) || 0\n\t\t});\n\n\t\t// Call event handler\n\t\tthis.props.onStart(e, createUIEvent(this));\n\n\t\t// Add event handlers\n\t\taddEvent(window, dragEventFor['move'], this.handleDrag);\n\t\taddEvent(window, dragEventFor['end'], this.handleDragEnd);\n\t},\n\n\thandleDragEnd: function (e) {\n\t\t// Short circuit if not currently dragging\n\t\tif (!this.state.dragging) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Turn off dragging\n\t\tthis.setState({\n\t\t\tdragging: false\n\t\t});\n\n\t\t// Call event handler\n\t\tthis.props.onStop(e, createUIEvent(this));\n\n\t\t// Remove event handlers\n removeEvent(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, dragEventFor['end'], this.handleDragEnd);\n\t},\n\n\thandleDrag: function (e) {\n var dragPoint = getControlPosition(e);\n\n\t\t// Calculate top and left\n var clientX = (this.state.startX + (dragPoint.clientX - this.state.offsetX));\n var clientY = (this.state.startY + (dragPoint.clientY - this.state.offsetY));\n\n\t\t// Snap to grid if prop has been provided\n\t\tif (Array.isArray(this.props.grid)) {\n\t\t\tvar directionX = clientX < parseInt(this.state.clientX, 10) ? -1 : 1;\n\t\t\tvar directionY = clientY < parseInt(this.state.clientY, 10) ? -1 : 1;\n\n\t\t\tclientX = Math.abs(clientX - parseInt(this.state.clientX, 10)) >= this.props.grid[0]\n\t\t\t\t\t? (parseInt(this.state.clientX, 10) + (this.props.grid[0] * directionX))\n\t\t\t\t\t: this.state.clientX;\n\n\t\t\tclientY = Math.abs(clientY - parseInt(this.state.clientY, 10)) >= this.props.grid[1]\n\t\t\t\t\t? (parseInt(this.state.clientY, 10) + (this.props.grid[1] * directionY))\n\t\t\t\t\t: this.state.clientY;\n\t\t}\n\n\t\t// Update top and left\n\t\tthis.setState({\n\t\t\tclientX: clientX,\n\t\t\tclientY: clientY\n\t\t});\n\n\t\t// Call event handler\n\t\tthis.props.onDrag(e, createUIEvent(this));\n\t},\n\n\trender: function () {\n\t\tvar style = {\n\t\t\t// Set top if vertical drag is enabled\n\t\t\ttop: canDragY(this)\n\t\t\t\t? this.state.clientY\n\t\t\t\t: this.state.startY,\n\n\t\t\t// Set left if horizontal drag is enabled\n\t\t\tleft: canDragX(this)\n\t\t\t\t? this.state.clientX\n\t\t\t\t: this.state.startX\n\t\t};\n\n\t\t// Set zIndex if currently dragging and prop has been provided\n\t\tif (this.state.dragging && !isNaN(this.props.zIndex)) {\n\t\t\tstyle.zIndex = this.props.zIndex;\n\t\t}\n\n\t\tvar className = 'react-draggable';\n\t\tif (this.state.dragging) {\n\t\t\tclassName += ' react-draggable-dragging';\n\t\t}\n\n\t\t// Reuse the child provided\n\t\t// This makes it flexible to use whatever element is wanted (div, ul, etc)\n\t\treturn React.addons.cloneWithProps(React.Children.only(this.props.children), {\n\t\t\tstyle: style,\n\t\t\tclassName: className,\n\n\t\t\tonMouseDown: this.handleDragStart,\n\t\t\tonTouchStart: function(ev){\n ev.preventDefault(); // prevent for scroll\n return this.handleDragStart.apply(this, arguments);\n }.bind(this),\n\n\t\t\tonMouseUp: this.handleDragEnd,\n\t\t\tonTouchEnd: this.handleDragEnd\n\t\t});\n\t}\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 **/"],"sourceRoot":"","file":"./dist/react-draggable.js"} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap fb8b33fa04334fccba28","webpack:///./index.js","webpack:///./lib/draggable.js","webpack:///external \"React\"","webpack:///./~/react/lib/cloneWithProps.js","webpack:///./~/react/lib/ReactElement.js","webpack:///./~/react/lib/ReactPropTransferer.js","webpack:///./~/react/lib/keyOf.js","webpack:///./~/react/lib/warning.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.js","webpack:///./~/react/lib/ReactContext.js","webpack:///./~/react/lib/ReactCurrentOwner.js","webpack:///./~/react/lib/Object.assign.js","webpack:///./~/react/lib/emptyFunction.js","webpack:///./~/react/lib/joinClasses.js","webpack:///./~/react/lib/emptyObject.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,wC;;;;;;;ACtCA,OAAM,CAAC,OAAO,GAAG,mBAAO,CAAC,CAAiB,CAAC,CAAC;;;;;;;ACA5C,aAAY,CAAC;;AAEb,sBAAqB;AACrB,KAAI,KAAK,GAAG,mBAAO,CAAC,CAAO,CAAC,CAAC;AAC7B,KAAI,aAAa,GA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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AAC9B;AACA;AACA;AACA;;GAEE,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,IAAI;AACnC,GAAE;;AAEF,EAAC,oBAAoB,EAAE,WAAW;;GAEhC,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,UAAU,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AI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,SAAS,EAAE,EAAE,EAAE,EAAE;OACrC,SAAS,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;OAC1B,IAAI,SAAS,EAAE;SACb,SAAS,GAAG,CAAC,SAAS,GAAG,SAAS,GAAG,GAAG,GAAG,EAAE,IAAI,SAAS,CAAC;QAC5D;MACF;IACF;GACD,OAAO,SAAS,CAAC;AACnB,EAAC;;AAED,OAAM,CAAC,OAAO,GAAG,WAAW,CAAC;;;;;;;ACtC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAG;;AAEH,aAAY,CAAC;;AAEb,KAAI,WAAW,GAAG,EAAE,CAAC;;AAErB,KAAI,YAAY,KAAK,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE;GACzC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAC7B,EAAC;;AAED,OAAM,CAAC,OAAO,GAAG,WAAW,CAAC","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"React\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"React\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ReactDraggable\"] = factory(require(\"React\"));\n\telse\n\t\troot[\"ReactDraggable\"] = factory(root[\"React\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap fb8b33fa04334fccba28\n **/","module.exports = require('./lib/draggable');\n\n\n\n/** WEBPACK FOOTER **\n ** ./index.js\n **/","'use strict';\n\n/** @jsx React.DOM */\nvar React = require('react');\nvar emptyFunction = function(){};\nvar cloneWithProps = require('react/lib/cloneWithProps');\n\nfunction createUIEvent(draggable) {\n\treturn {\n\t\tposition: {\n\t\t\ttop: draggable.state.clientY,\n\t\t\tleft: draggable.state.clientX\n\t\t}\n\t};\n}\n\nfunction canDragY(draggable) {\n\treturn draggable.props.axis === 'both' ||\n\t\t\tdraggable.props.axis === 'y';\n}\n\nfunction canDragX(draggable) {\n\treturn draggable.props.axis === 'both' ||\n\t\t\tdraggable.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, element = null; i < length, element = array[i]; i++) {\n if (callback.apply(callback, [element, i, array])) return element;\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\tif (!el) { return; }\n\tif (el.attachEvent) {\n\t\tel.attachEvent('on' + event, handler);\n\t} else if (el.addEventListener) {\n\t\tel.addEventListener(event, handler, true);\n\t} else {\n\t\tel['on' + event] = handler;\n\t}\n}\n\nfunction removeEvent(el, event, handler) {\n\tif (!el) { return; }\n\tif (el.detachEvent) {\n\t\tel.detachEvent('on' + event, handler);\n\t} else if (el.removeEventListener) {\n\t\tel.removeEventListener(event, handler, true);\n\t} else {\n\t\tel['on' + event] = null;\n\t}\n}\n\nmodule.exports = React.createClass({\n\tdisplayName: 'Draggable',\n\n\tpropTypes: {\n\t\t/**\n\t\t * `axis` determines which axis the draggable can move.\n\t\t *\n\t\t * 'both' allows movement horizontally and vertically.\n\t\t * 'x' limits movement to horizontal axis.\n\t\t * 'y' limits movement to vertical axis.\n\t\t *\n\t\t * Defaults to 'both'.\n\t\t */\n\t\taxis: React.PropTypes.oneOf(['both', 'x', 'y']),\n\n\t\t/**\n\t\t * `handle` specifies a selector to be used as the handle that initiates drag.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t \treturn (\n\t\t * \t \t \t\n\t\t * \t \t \t
\n\t\t * \t \t \t
Click me to drag
\n\t\t * \t \t \t
This is some other content
\n\t\t * \t \t \t
\n\t\t * \t \t\t
\n\t\t * \t \t);\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\thandle: React.PropTypes.string,\n\n\t\t/**\n\t\t * `cancel` specifies a selector to be used to prevent drag initialization.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t return(\n\t\t * \t \n\t\t * \t
\n\t\t * \t \t
You can't drag from here
\n\t\t *\t\t\t\t\t\t
Dragging here works fine
\n\t\t * \t
\n\t\t * \t
\n\t\t * \t );\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\tcancel: React.PropTypes.string,\n\n\t\t/**\n\t\t * `grid` specifies the x and y that dragging should snap to.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t return (\n\t\t * \t \n\t\t * \t
I snap to a 25 x 25 grid
\n\t\t * \t
\n\t\t * \t );\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\tgrid: React.PropTypes.arrayOf(React.PropTypes.number),\n\n\t\t/**\n\t\t * `start` specifies the x and y that the dragged item should start at\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t return (\n\t\t * \t \n\t\t * \t
I start with left: 25px; top: 25px;
\n\t\t * \t
\n\t\t * \t );\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\tstart: React.PropTypes.object,\n\n\t\t/**\n\t\t * `zIndex` specifies the zIndex to use while dragging.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```jsx\n\t\t * \tvar App = React.createClass({\n\t\t * \t render: function () {\n\t\t * \t return (\n\t\t * \t \n\t\t * \t
I have a zIndex
\n\t\t * \t
\n\t\t * \t );\n\t\t * \t }\n\t\t * \t});\n\t\t * ```\n\t\t */\n\t\tzIndex: React.PropTypes.number,\n\n\t\t/**\n\t\t * Called when dragging starts.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```js\n\t\t *\tfunction (event, ui) {}\n\t\t * ```\n\t\t *\n\t\t * `event` is the Event that was triggered.\n\t\t * `ui` is an object:\n\t\t *\n\t\t * ```js\n\t\t *\t{\n\t\t *\t\tposition: {top: 0, left: 0}\n\t\t *\t}\n\t\t * ```\n\t\t */\n\t\tonStart: React.PropTypes.func,\n\n\t\t/**\n\t\t * Called while dragging.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```js\n\t\t *\tfunction (event, ui) {}\n\t\t * ```\n\t\t *\n\t\t * `event` is the Event that was triggered.\n\t\t * `ui` is an object:\n\t\t *\n\t\t * ```js\n\t\t *\t{\n\t\t *\t\tposition: {top: 0, left: 0}\n\t\t *\t}\n\t\t * ```\n\t\t */\n\t\tonDrag: React.PropTypes.func,\n\n\t\t/**\n\t\t * Called when dragging stops.\n\t\t *\n\t\t * Example:\n\t\t *\n\t\t * ```js\n\t\t *\tfunction (event, ui) {}\n\t\t * ```\n\t\t *\n\t\t * `event` is the Event that was triggered.\n\t\t * `ui` is an object:\n\t\t *\n\t\t * ```js\n\t\t *\t{\n\t\t *\t\tposition: {top: 0, left: 0}\n\t\t *\t}\n\t\t * ```\n\t\t */\n\t\tonStop: React.PropTypes.func,\n\n\t\t/**\n\t\t * A workaround option which can be passed if onMouseDown needs to be accessed, since it'll always be blocked (due to that there's internal use of onMouseDown)\n\t\t *\n\t\t */\n\t\tonMouseDown: React.PropTypes.func\n\t},\n\n\tcomponentWillUnmount: function() {\n\t\t// Remove any leftover event handlers\n\t\tremoveEvent(window, dragEventFor['move'], this.handleDrag);\n\t\tremoveEvent(window, dragEventFor['end'], this.handleDragEnd);\n\t},\n\n\tgetDefaultProps: function () {\n\t\treturn {\n\t\t\taxis: 'both',\n\t\t\thandle: null,\n\t\t\tcancel: null,\n\t\t\tgrid: null,\n\t\t\tstart: {\n\t\t\t\tx: 0,\n\t\t\t\ty: 0\n\t\t\t},\n\t\t\tzIndex: NaN,\n\t\t\tonStart: emptyFunction,\n\t\t\tonDrag: emptyFunction,\n\t\t\tonStop: emptyFunction,\n\t\t\tonMouseDown: emptyFunction\n\t\t};\n\t},\n\n\tgetInitialState: function () {\n\t\treturn {\n\t\t\t// Whether or not currently dragging\n\t\t\tdragging: false,\n\n\t\t\t// Start top/left of this.getDOMNode()\n\t\t\tstartX: 0, startY: 0,\n\n\t\t\t// Offset between start top/left and mouse top/left\n\t\t\toffsetX: 0, offsetY: 0,\n\n\t\t\t// Current top/left of this.getDOMNode()\n\t\t\tclientX: this.props.start.x, clientY: this.props.start.y\n\t\t};\n\t},\n\n\thandleDragStart: 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\t\t// Make it possible to attach event handlers on top of this one\n\t\tthis.props.onMouseDown(e);\n\n\t\tvar node = this.getDOMNode();\n\n\t\t// Short circuit if handle or cancel prop was provided and selector doesn't match\n\t\tif ((this.props.handle && !matchesSelector(e.target, this.props.handle)) ||\n\t\t\t(this.props.cancel && matchesSelector(e.target, this.props.cancel))) {\n\t\t\treturn;\n\t\t}\n\n var dragPoint = getControlPosition(e);\n\n\t\t// Initiate dragging\n\t\tthis.setState({\n\t\t\tdragging: true,\n\t\t\toffsetX: parseInt(dragPoint.clientX, 10),\n\t\t\toffsetY: parseInt(dragPoint.clientY, 10),\n\t\t\tstartX: parseInt(node.style.left, 10) || 0,\n\t\t\tstartY: parseInt(node.style.top, 10) || 0\n\t\t});\n\n\t\t// Call event handler\n\t\tthis.props.onStart(e, createUIEvent(this));\n\n\t\t// Add event handlers\n\t\taddEvent(window, dragEventFor['move'], this.handleDrag);\n\t\taddEvent(window, dragEventFor['end'], this.handleDragEnd);\n\t},\n\n\thandleDragEnd: function (e) {\n\t\t// Short circuit if not currently dragging\n\t\tif (!this.state.dragging) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Turn off dragging\n\t\tthis.setState({\n\t\t\tdragging: false\n\t\t});\n\n\t\t// Call event handler\n\t\tthis.props.onStop(e, createUIEvent(this));\n\n\t\t// Remove event handlers\n removeEvent(window, dragEventFor['move'], this.handleDrag);\n removeEvent(window, dragEventFor['end'], this.handleDragEnd);\n\t},\n\n\thandleDrag: function (e) {\n var dragPoint = getControlPosition(e);\n\n\t\t// Calculate top and left\n var clientX = (this.state.startX + (dragPoint.clientX - this.state.offsetX));\n var clientY = (this.state.startY + (dragPoint.clientY - this.state.offsetY));\n\n\t\t// Snap to grid if prop has been provided\n\t\tif (Array.isArray(this.props.grid)) {\n\t\t\tvar directionX = clientX < parseInt(this.state.clientX, 10) ? -1 : 1;\n\t\t\tvar directionY = clientY < parseInt(this.state.clientY, 10) ? -1 : 1;\n\n\t\t\tclientX = Math.abs(clientX - parseInt(this.state.clientX, 10)) >= this.props.grid[0]\n\t\t\t\t\t? (parseInt(this.state.clientX, 10) + (this.props.grid[0] * directionX))\n\t\t\t\t\t: this.state.clientX;\n\n\t\t\tclientY = Math.abs(clientY - parseInt(this.state.clientY, 10)) >= this.props.grid[1]\n\t\t\t\t\t? (parseInt(this.state.clientY, 10) + (this.props.grid[1] * directionY))\n\t\t\t\t\t: this.state.clientY;\n\t\t}\n\n\t\t// Update top and left\n\t\tthis.setState({\n\t\t\tclientX: clientX,\n\t\t\tclientY: clientY\n\t\t});\n\n\t\t// Call event handler\n\t\tthis.props.onDrag(e, createUIEvent(this));\n\t},\n\n\trender: function () {\n\t\tvar style = {\n\t\t\t// Set top if vertical drag is enabled\n\t\t\ttop: canDragY(this)\n\t\t\t\t? this.state.clientY\n\t\t\t\t: this.state.startY,\n\n\t\t\t// Set left if horizontal drag is enabled\n\t\t\tleft: canDragX(this)\n\t\t\t\t? this.state.clientX\n\t\t\t\t: this.state.startX\n\t\t};\n\n\t\t// Set zIndex if currently dragging and prop has been provided\n\t\tif (this.state.dragging && !isNaN(this.props.zIndex)) {\n\t\t\tstyle.zIndex = this.props.zIndex;\n\t\t}\n\n\t\tvar className = 'react-draggable';\n\t\tif (this.state.dragging) {\n\t\t\tclassName += ' react-draggable-dragging';\n\t\t}\n\n\t\t// Reuse the child provided\n\t\t// This makes it flexible to use whatever element is wanted (div, ul, etc)\n\t\treturn cloneWithProps(React.Children.only(this.props.children), {\n\t\t\tstyle: style,\n\t\t\tclassName: className,\n\n\t\t\tonMouseDown: this.handleDragStart,\n\t\t\tonTouchStart: function(ev){\n ev.preventDefault(); // prevent for scroll\n return this.handleDragStart.apply(this, arguments);\n }.bind(this),\n\n\t\t\tonMouseUp: this.handleDragEnd,\n\t\t\tonTouchEnd: this.handleDragEnd\n\t\t});\n\t}\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 **/","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @typechecks static-only\n * @providesModule cloneWithProps\n */\n\n'use strict';\n\nvar ReactElement = require(\"./ReactElement\");\nvar ReactPropTransferer = require(\"./ReactPropTransferer\");\n\nvar keyOf = require(\"./keyOf\");\nvar warning = require(\"./warning\");\n\nvar CHILDREN_PROP = keyOf({children: null});\n\n/**\n * Sometimes you want to change the props of a child passed to you. Usually\n * this is to add a CSS class.\n *\n * @param {ReactElement} child child element you'd like to clone\n * @param {object} props props you'd like to modify. className and style will be\n * merged automatically.\n * @return {ReactElement} a clone of child with props merged in.\n */\nfunction cloneWithProps(child, props) {\n if (\"production\" !== process.env.NODE_ENV) {\n (\"production\" !== process.env.NODE_ENV ? warning(\n !child.ref,\n 'You are calling cloneWithProps() on a child with a ref. This is ' +\n 'dangerous because you\\'re creating a new child which will not be ' +\n 'added as a ref to its parent.'\n ) : null);\n }\n\n var newProps = ReactPropTransferer.mergeProps(props, child.props);\n\n // Use `child.props.children` if it is provided.\n if (!newProps.hasOwnProperty(CHILDREN_PROP) &&\n child.props.hasOwnProperty(CHILDREN_PROP)) {\n newProps.children = child.props.children;\n }\n\n // The current API doesn't retain _owner and _context, which is why this\n // doesn't use ReactElement.cloneAndReplaceProps.\n return ReactElement.createElement(child.type, newProps);\n}\n\nmodule.exports = cloneWithProps;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/cloneWithProps.js\n **/","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactElement\n */\n\n'use strict';\n\nvar ReactContext = require(\"./ReactContext\");\nvar ReactCurrentOwner = require(\"./ReactCurrentOwner\");\n\nvar assign = require(\"./Object.assign\");\nvar warning = require(\"./warning\");\n\nvar RESERVED_PROPS = {\n key: true,\n ref: true\n};\n\n/**\n * Warn for mutations.\n *\n * @internal\n * @param {object} object\n * @param {string} key\n */\nfunction defineWarningProperty(object, key) {\n Object.defineProperty(object, key, {\n\n configurable: false,\n enumerable: true,\n\n get: function() {\n if (!this._store) {\n return null;\n }\n return this._store[key];\n },\n\n set: function(value) {\n (\"production\" !== process.env.NODE_ENV ? warning(\n false,\n 'Don\\'t set the %s property of the React element. Instead, ' +\n 'specify the correct value when initially creating the element.',\n key\n ) : null);\n this._store[key] = value;\n }\n\n });\n}\n\n/**\n * This is updated to true if the membrane is successfully created.\n */\nvar useMutationMembrane = false;\n\n/**\n * Warn for mutations.\n *\n * @internal\n * @param {object} element\n */\nfunction defineMutationMembrane(prototype) {\n try {\n var pseudoFrozenProperties = {\n props: true\n };\n for (var key in pseudoFrozenProperties) {\n defineWarningProperty(prototype, key);\n }\n useMutationMembrane = true;\n } catch (x) {\n // IE will fail on defineProperty\n }\n}\n\n/**\n * Base constructor for all React elements. This is only used to make this\n * work with a dynamic instanceof check. Nothing should live on this prototype.\n *\n * @param {*} type\n * @param {string|object} ref\n * @param {*} key\n * @param {*} props\n * @internal\n */\nvar ReactElement = function(type, key, ref, owner, context, props) {\n // Built-in properties that belong on the element\n this.type = type;\n this.key = key;\n this.ref = ref;\n\n // Record the component responsible for creating this element.\n this._owner = owner;\n\n // TODO: Deprecate withContext, and then the context becomes accessible\n // through the owner.\n this._context = context;\n\n if (\"production\" !== process.env.NODE_ENV) {\n // The validation flag and props are currently mutative. We put them on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n this._store = {props: props, originalProps: assign({}, props)};\n\n // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n try {\n Object.defineProperty(this._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true\n });\n } catch (x) {\n }\n this._store.validated = false;\n\n // We're not allowed to set props directly on the object so we early\n // return and rely on the prototype membrane to forward to the backing\n // store.\n if (useMutationMembrane) {\n Object.freeze(this);\n return;\n }\n }\n\n this.props = props;\n};\n\n// We intentionally don't expose the function on the constructor property.\n// ReactElement should be indistinguishable from a plain object.\nReactElement.prototype = {\n _isReactElement: true\n};\n\nif (\"production\" !== process.env.NODE_ENV) {\n defineMutationMembrane(ReactElement.prototype);\n}\n\nReactElement.createElement = function(type, config, children) {\n var propName;\n\n // Reserved names are extracted\n var props = {};\n\n var key = null;\n var ref = null;\n\n if (config != null) {\n ref = config.ref === undefined ? null : config.ref;\n key = config.key === undefined ? null : '' + config.key;\n // Remaining properties are added to a new props object\n for (propName in config) {\n if (config.hasOwnProperty(propName) &&\n !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n // Resolve default props\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n for (propName in defaultProps) {\n if (typeof props[propName] === 'undefined') {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n return new ReactElement(\n type,\n key,\n ref,\n ReactCurrentOwner.current,\n ReactContext.current,\n props\n );\n};\n\nReactElement.createFactory = function(type) {\n var factory = ReactElement.createElement.bind(null, type);\n // Expose the type on the factory and the prototype so that it can be\n // easily accessed on elements. E.g. .type === Foo.type.\n // This should not be named `constructor` since this may not be the function\n // that created the element, and it may not even be a constructor.\n // Legacy hook TODO: Warn if this is accessed\n factory.type = type;\n return factory;\n};\n\nReactElement.cloneAndReplaceProps = function(oldElement, newProps) {\n var newElement = new ReactElement(\n oldElement.type,\n oldElement.key,\n oldElement.ref,\n oldElement._owner,\n oldElement._context,\n newProps\n );\n\n if (\"production\" !== process.env.NODE_ENV) {\n // If the key on the original is valid, then the clone is valid\n newElement._store.validated = oldElement._store.validated;\n }\n return newElement;\n};\n\nReactElement.cloneElement = function(element, config, children) {\n var propName;\n\n // Original props are copied\n var props = assign({}, element.props);\n\n // Reserved names are extracted\n var key = element.key;\n var ref = element.ref;\n\n // Owner will be preserved, unless ref is overridden\n var owner = element._owner;\n\n if (config != null) {\n if (config.ref !== undefined) {\n // Silently steal the ref from the parent.\n ref = config.ref;\n owner = ReactCurrentOwner.current;\n }\n if (config.key !== undefined) {\n key = '' + config.key;\n }\n // Remaining properties override existing props\n for (propName in config) {\n if (config.hasOwnProperty(propName) &&\n !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n }\n }\n\n // Children can be more than one argument, and those are transferred onto\n // the newly allocated props object.\n var childrenLength = arguments.length - 2;\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 2];\n }\n props.children = childArray;\n }\n\n return new ReactElement(\n element.type,\n key,\n ref,\n owner,\n element._context,\n props\n );\n};\n\n/**\n * @param {?object} object\n * @return {boolean} True if `object` is a valid component.\n * @final\n */\nReactElement.isValidElement = function(object) {\n // ReactTestUtils is often used outside of beforeEach where as React is\n // within it. This leads to two different instances of React on the same\n // page. To identify a element from a different React instance we use\n // a flag instead of an instanceof check.\n var isElement = !!(object && object._isReactElement);\n // if (isElement && !(object instanceof ReactElement)) {\n // This is an indicator that you're using multiple versions of React at the\n // same time. This will screw with ownership and stuff. Fix it, please.\n // TODO: We could possibly warn here.\n // }\n return isElement;\n};\n\nmodule.exports = ReactElement;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/ReactElement.js\n **/","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactPropTransferer\n */\n\n'use strict';\n\nvar assign = require(\"./Object.assign\");\nvar emptyFunction = require(\"./emptyFunction\");\nvar joinClasses = require(\"./joinClasses\");\n\n/**\n * Creates a transfer strategy that will merge prop values using the supplied\n * `mergeStrategy`. If a prop was previously unset, this just sets it.\n *\n * @param {function} mergeStrategy\n * @return {function}\n */\nfunction createTransferStrategy(mergeStrategy) {\n return function(props, key, value) {\n if (!props.hasOwnProperty(key)) {\n props[key] = value;\n } else {\n props[key] = mergeStrategy(props[key], value);\n }\n };\n}\n\nvar transferStrategyMerge = createTransferStrategy(function(a, b) {\n // `merge` overrides the first object's (`props[key]` above) keys using the\n // second object's (`value`) keys. An object's style's existing `propA` would\n // get overridden. Flip the order here.\n return assign({}, b, a);\n});\n\n/**\n * Transfer strategies dictate how props are transferred by `transferPropsTo`.\n * NOTE: if you add any more exceptions to this list you should be sure to\n * update `cloneWithProps()` accordingly.\n */\nvar TransferStrategies = {\n /**\n * Never transfer `children`.\n */\n children: emptyFunction,\n /**\n * Transfer the `className` prop by merging them.\n */\n className: createTransferStrategy(joinClasses),\n /**\n * Transfer the `style` prop (which is an object) by merging them.\n */\n style: transferStrategyMerge\n};\n\n/**\n * Mutates the first argument by transferring the properties from the second\n * argument.\n *\n * @param {object} props\n * @param {object} newProps\n * @return {object}\n */\nfunction transferInto(props, newProps) {\n for (var thisKey in newProps) {\n if (!newProps.hasOwnProperty(thisKey)) {\n continue;\n }\n\n var transferStrategy = TransferStrategies[thisKey];\n\n if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) {\n transferStrategy(props, thisKey, newProps[thisKey]);\n } else if (!props.hasOwnProperty(thisKey)) {\n props[thisKey] = newProps[thisKey];\n }\n }\n return props;\n}\n\n/**\n * ReactPropTransferer are capable of transferring props to another component\n * using a `transferPropsTo` method.\n *\n * @class ReactPropTransferer\n */\nvar ReactPropTransferer = {\n\n /**\n * Merge two props objects using TransferStrategies.\n *\n * @param {object} oldProps original props (they take precedence)\n * @param {object} newProps new props to merge in\n * @return {object} a new object containing both sets of props merged.\n */\n mergeProps: function(oldProps, newProps) {\n return transferInto(assign({}, oldProps), newProps);\n }\n\n};\n\nmodule.exports = ReactPropTransferer;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/ReactPropTransferer.js\n **/","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule keyOf\n */\n\n/**\n * Allows extraction of a minified key. Let's the build system minify keys\n * without loosing the ability to dynamically use key strings as values\n * themselves. Pass in an object with a single key/val pair and it will return\n * you the string key of that single record. Suppose you want to grab the\n * value for a key 'className' inside of an object. Key/val minification may\n * have aliased that key to be 'xa12'. keyOf({className: null}) will return\n * 'xa12' in that case. Resolve keys you want to use once at startup time, then\n * reuse those resolutions.\n */\nvar keyOf = function(oneKeyObj) {\n var key;\n for (key in oneKeyObj) {\n if (!oneKeyObj.hasOwnProperty(key)) {\n continue;\n }\n return key;\n }\n return null;\n};\n\n\nmodule.exports = keyOf;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/keyOf.js\n **/","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule warning\n */\n\n\"use strict\";\n\nvar emptyFunction = require(\"./emptyFunction\");\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar warning = emptyFunction;\n\nif (\"production\" !== process.env.NODE_ENV) {\n warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]);\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n\n if (format.length < 10 || /^[s\\W]*$/.test(format)) {\n throw new Error(\n 'The warning format should be able to uniquely identify this ' +\n 'warning. Please, use a more descriptive format than: ' + format\n );\n }\n\n if (format.indexOf('Failed Composite propType: ') === 0) {\n return; // Ignore CompositeComponent proptype check.\n }\n\n if (!condition) {\n var argIndex = 0;\n var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];});\n console.warn(message);\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch(x) {}\n }\n };\n}\n\nmodule.exports = warning;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/warning.js\n **/","// shim for using process in browser\n\nvar process = module.exports = {};\n\nprocess.nextTick = (function () {\n var canSetImmediate = typeof window !== 'undefined'\n && window.setImmediate;\n var canMutationObserver = typeof window !== 'undefined'\n && window.MutationObserver;\n var canPost = typeof window !== 'undefined'\n && window.postMessage && window.addEventListener\n ;\n\n if (canSetImmediate) {\n return function (f) { return window.setImmediate(f) };\n }\n\n var queue = [];\n\n if (canMutationObserver) {\n var hiddenDiv = document.createElement(\"div\");\n var observer = new MutationObserver(function () {\n var queueList = queue.slice();\n queue.length = 0;\n queueList.forEach(function (fn) {\n fn();\n });\n });\n\n observer.observe(hiddenDiv, { attributes: true });\n\n return function nextTick(fn) {\n if (!queue.length) {\n hiddenDiv.setAttribute('yes', 'no');\n }\n queue.push(fn);\n };\n }\n\n if (canPost) {\n window.addEventListener('message', function (ev) {\n var source = ev.source;\n if ((source === window || source === null) && ev.data === 'process-tick') {\n ev.stopPropagation();\n if (queue.length > 0) {\n var fn = queue.shift();\n fn();\n }\n }\n }, true);\n\n return function nextTick(fn) {\n queue.push(fn);\n window.postMessage('process-tick', '*');\n };\n }\n\n return function nextTick(fn) {\n setTimeout(fn, 0);\n };\n})();\n\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\n// TODO(shtylman)\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\n\n\n\n/** WEBPACK FOOTER **\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n **/","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactContext\n */\n\n'use strict';\n\nvar assign = require(\"./Object.assign\");\nvar emptyObject = require(\"./emptyObject\");\nvar warning = require(\"./warning\");\n\nvar didWarn = false;\n\n/**\n * Keeps track of the current context.\n *\n * The context is automatically passed down the component ownership hierarchy\n * and is accessible via `this.context` on ReactCompositeComponents.\n */\nvar ReactContext = {\n\n /**\n * @internal\n * @type {object}\n */\n current: emptyObject,\n\n /**\n * Temporarily extends the current context while executing scopedCallback.\n *\n * A typical use case might look like\n *\n * render: function() {\n * var children = ReactContext.withContext({foo: 'foo'}, () => (\n *\n * ));\n * return
{children}
;\n * }\n *\n * @param {object} newContext New context to merge into the existing context\n * @param {function} scopedCallback Callback to run with the new context\n * @return {ReactComponent|array}\n */\n withContext: function(newContext, scopedCallback) {\n if (\"production\" !== process.env.NODE_ENV) {\n (\"production\" !== process.env.NODE_ENV ? warning(\n didWarn,\n 'withContext is deprecated and will be removed in a future version. ' +\n 'Use a wrapper component with getChildContext instead.'\n ) : null);\n\n didWarn = true;\n }\n\n var result;\n var previousContext = ReactContext.current;\n ReactContext.current = assign({}, previousContext, newContext);\n try {\n result = scopedCallback();\n } finally {\n ReactContext.current = previousContext;\n }\n return result;\n }\n\n};\n\nmodule.exports = ReactContext;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/ReactContext.js\n **/","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ReactCurrentOwner\n */\n\n'use strict';\n\n/**\n * Keeps track of the current owner.\n *\n * The current owner is the component who should own any components that are\n * currently being constructed.\n *\n * The depth indicate how many composite components are above this render level.\n */\nvar ReactCurrentOwner = {\n\n /**\n * @internal\n * @type {ReactComponent}\n */\n current: null\n\n};\n\nmodule.exports = ReactCurrentOwner;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/ReactCurrentOwner.js\n **/","/**\n * Copyright 2014-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule Object.assign\n */\n\n// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign\n\n'use strict';\n\nfunction assign(target, sources) {\n if (target == null) {\n throw new TypeError('Object.assign target cannot be null or undefined');\n }\n\n var to = Object(target);\n var hasOwnProperty = Object.prototype.hasOwnProperty;\n\n for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {\n var nextSource = arguments[nextIndex];\n if (nextSource == null) {\n continue;\n }\n\n var from = Object(nextSource);\n\n // We don't currently support accessors nor proxies. Therefore this\n // copy cannot throw. If we ever supported this then we must handle\n // exceptions and side-effects. We don't support symbols so they won't\n // be transferred.\n\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n }\n\n return to;\n}\n\nmodule.exports = assign;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/Object.assign.js\n **/","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule emptyFunction\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 */\nfunction emptyFunction() {}\n\nemptyFunction.thatReturns = makeEmptyFunction;\nemptyFunction.thatReturnsFalse = makeEmptyFunction(false);\nemptyFunction.thatReturnsTrue = makeEmptyFunction(true);\nemptyFunction.thatReturnsNull = makeEmptyFunction(null);\nemptyFunction.thatReturnsThis = function() { return this; };\nemptyFunction.thatReturnsArgument = function(arg) { return arg; };\n\nmodule.exports = emptyFunction;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/emptyFunction.js\n **/","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule joinClasses\n * @typechecks static-only\n */\n\n'use strict';\n\n/**\n * Combines multiple className strings into one.\n * http://jsperf.com/joinclasses-args-vs-array\n *\n * @param {...?string} classes\n * @return {string}\n */\nfunction joinClasses(className/*, ... */) {\n if (!className) {\n className = '';\n }\n var nextClass;\n var argLength = arguments.length;\n if (argLength > 1) {\n for (var ii = 1; ii < argLength; ii++) {\n nextClass = arguments[ii];\n if (nextClass) {\n className = (className ? className + ' ' : '') + nextClass;\n }\n }\n }\n return className;\n}\n\nmodule.exports = joinClasses;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/joinClasses.js\n **/","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule emptyObject\n */\n\n\"use strict\";\n\nvar emptyObject = {};\n\nif (\"production\" !== process.env.NODE_ENV) {\n Object.freeze(emptyObject);\n}\n\nmodule.exports = emptyObject;\n\n\n\n/** WEBPACK FOOTER **\n ** ./~/react/lib/emptyObject.js\n **/"],"sourceRoot":"","file":"./dist/react-draggable.js"} \ No newline at end of file diff --git a/dist/react-draggable.min.js b/dist/react-draggable.min.js index d060aa51..5e08e5e7 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){return{position:{top:draggable.state.clientY,left:draggable.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,element=(array.length,null);element=array[i];i++)if(callback.apply(callback,[element,i,array]))return element}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)}var React=__webpack_require__(2),emptyFunction=function(){};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"]}();module.exports=React.createClass({displayName:"Draggable",propTypes:{axis:React.PropTypes.oneOf(["both","x","y"]),handle:React.PropTypes.string,cancel:React.PropTypes.string,grid:React.PropTypes.arrayOf(React.PropTypes.number),start:React.PropTypes.object,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)},getDefaultProps:function(){return{axis:"both",handle:null,cancel:null,grid:null,start:{x:0,y:0},zIndex:0/0,onStart:emptyFunction,onDrag:emptyFunction,onStop:emptyFunction,onMouseDown:emptyFunction}},getInitialState:function(){return{dragging:!1,startX:0,startY:0,offsetX:0,offsetY:0,clientX:this.props.start.x,clientY:this.props.start.y}},handleDragStart:function(e){this.props.onMouseDown(e);var node=this.getDOMNode();if(!(this.props.handle&&!matchesSelector(e.target,this.props.handle)||this.props.cancel&&matchesSelector(e.target,this.props.cancel))){var dragPoint=getControlPosition(e);this.setState({dragging:!0,offsetX:parseInt(dragPoint.clientX,10),offsetY:parseInt(dragPoint.clientY,10),startX:parseInt(node.style.left,10)||0,startY:parseInt(node.style.top,10)||0}),this.props.onStart(e,createUIEvent(this)),addEvent(window,dragEventFor.move,this.handleDrag),addEvent(window,dragEventFor.end,this.handleDragEnd)}},handleDragEnd:function(e){this.state.dragging&&(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=this.state.startX+(dragPoint.clientX-this.state.offsetX),clientY=this.state.startY+(dragPoint.clientY-this.state.offsetY);if(Array.isArray(this.props.grid)){var directionX=clientX=this.props.grid[0]?parseInt(this.state.clientX,10)+this.props.grid[0]*directionX:this.state.clientX,clientY=Math.abs(clientY-parseInt(this.state.clientY,10))>=this.props.grid[1]?parseInt(this.state.clientY,10)+this.props.grid[1]*directionY:this.state.clientY}this.setState({clientX:clientX,clientY:clientY}),this.props.onDrag(e,createUIEvent(this))},render:function(){var style={top:canDragY(this)?this.state.clientY:this.state.startY,left:canDragX(this)?this.state.clientX:this.state.startX};this.state.dragging&&!isNaN(this.props.zIndex)&&(style.zIndex=this.props.zIndex);var className="react-draggable";return this.state.dragging&&(className+=" react-draggable-dragging"),React.addons.cloneWithProps(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){module.exports=__WEBPACK_EXTERNAL_MODULE_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){return{position:{top:draggable.state.clientY,left:draggable.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,element=(array.length,null);element=array[i];i++)if(callback.apply(callback,[element,i,array]))return element}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)}var React=__webpack_require__(2),emptyFunction=function(){},cloneWithProps=__webpack_require__(3);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"]}();module.exports=React.createClass({displayName:"Draggable",propTypes:{axis:React.PropTypes.oneOf(["both","x","y"]),handle:React.PropTypes.string,cancel:React.PropTypes.string,grid:React.PropTypes.arrayOf(React.PropTypes.number),start:React.PropTypes.object,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)},getDefaultProps:function(){return{axis:"both",handle:null,cancel:null,grid:null,start:{x:0,y:0},zIndex:0/0,onStart:emptyFunction,onDrag:emptyFunction,onStop:emptyFunction,onMouseDown:emptyFunction}},getInitialState:function(){return{dragging:!1,startX:0,startY:0,offsetX:0,offsetY:0,clientX:this.props.start.x,clientY:this.props.start.y}},handleDragStart:function(e){this.props.onMouseDown(e);var node=this.getDOMNode();if(!(this.props.handle&&!matchesSelector(e.target,this.props.handle)||this.props.cancel&&matchesSelector(e.target,this.props.cancel))){var dragPoint=getControlPosition(e);this.setState({dragging:!0,offsetX:parseInt(dragPoint.clientX,10),offsetY:parseInt(dragPoint.clientY,10),startX:parseInt(node.style.left,10)||0,startY:parseInt(node.style.top,10)||0}),this.props.onStart(e,createUIEvent(this)),addEvent(window,dragEventFor.move,this.handleDrag),addEvent(window,dragEventFor.end,this.handleDragEnd)}},handleDragEnd:function(e){this.state.dragging&&(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=this.state.startX+(dragPoint.clientX-this.state.offsetX),clientY=this.state.startY+(dragPoint.clientY-this.state.offsetY);if(Array.isArray(this.props.grid)){var directionX=clientX=this.props.grid[0]?parseInt(this.state.clientX,10)+this.props.grid[0]*directionX:this.state.clientX,clientY=Math.abs(clientY-parseInt(this.state.clientY,10))>=this.props.grid[1]?parseInt(this.state.clientY,10)+this.props.grid[1]*directionY:this.state.clientY}this.setState({clientX:clientX,clientY:clientY}),this.props.onDrag(e,createUIEvent(this))},render:function(){var style={top:canDragY(this)?this.state.clientY:this.state.startY,left:canDragX(this)?this.state.clientX:this.state.startX};this.state.dragging&&!isNaN(this.props.zIndex)&&(style.zIndex=this.props.zIndex);var className="react-draggable";return this.state.dragging&&(className+=" react-draggable-dragging"),cloneWithProps(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){module.exports=__WEBPACK_EXTERNAL_MODULE_2__},function(module,exports,__webpack_require__){(function(process){"use strict";function cloneWithProps(child,props){"production"!==process.env.NODE_ENV&&("production"!==process.env.NODE_ENV?warning(!child.ref,"You are calling cloneWithProps() on a child with a ref. This is dangerous because you're creating a new child which will not be added as a ref to its parent."):null);var newProps=ReactPropTransferer.mergeProps(props,child.props);return!newProps.hasOwnProperty(CHILDREN_PROP)&&child.props.hasOwnProperty(CHILDREN_PROP)&&(newProps.children=child.props.children),ReactElement.createElement(child.type,newProps)}var ReactElement=__webpack_require__(4),ReactPropTransferer=__webpack_require__(5),keyOf=__webpack_require__(6),warning=__webpack_require__(7),CHILDREN_PROP=keyOf({children:null});module.exports=cloneWithProps}).call(exports,__webpack_require__(8))},function(module,exports,__webpack_require__){(function(process){"use strict";function defineWarningProperty(object,key){Object.defineProperty(object,key,{configurable:!1,enumerable:!0,get:function(){return this._store?this._store[key]:null},set:function(value){"production"!==process.env.NODE_ENV?warning(!1,"Don't set the %s property of the React element. Instead, specify the correct value when initially creating the element.",key):null,this._store[key]=value}})}function defineMutationMembrane(prototype){try{var pseudoFrozenProperties={props:!0};for(var key in pseudoFrozenProperties)defineWarningProperty(prototype,key);useMutationMembrane=!0}catch(x){}}var ReactContext=__webpack_require__(9),ReactCurrentOwner=__webpack_require__(10),assign=__webpack_require__(11),warning=__webpack_require__(7),RESERVED_PROPS={key:!0,ref:!0},useMutationMembrane=!1,ReactElement=function(type,key,ref,owner,context,props){if(this.type=type,this.key=key,this.ref=ref,this._owner=owner,this._context=context,"production"!==process.env.NODE_ENV){this._store={props:props,originalProps:assign({},props)};try{Object.defineProperty(this._store,"validated",{configurable:!1,enumerable:!1,writable:!0})}catch(x){}if(this._store.validated=!1,useMutationMembrane)return void Object.freeze(this)}this.props=props};ReactElement.prototype={_isReactElement:!0},"production"!==process.env.NODE_ENV&&defineMutationMembrane(ReactElement.prototype),ReactElement.createElement=function(type,config,children){var propName,props={},key=null,ref=null;if(null!=config){ref=void 0===config.ref?null:config.ref,key=void 0===config.key?null:""+config.key;for(propName in config)config.hasOwnProperty(propName)&&!RESERVED_PROPS.hasOwnProperty(propName)&&(props[propName]=config[propName])}var childrenLength=arguments.length-2;if(1===childrenLength)props.children=children;else if(childrenLength>1){for(var childArray=Array(childrenLength),i=0;childrenLength>i;i++)childArray[i]=arguments[i+2];props.children=childArray}if(type&&type.defaultProps){var defaultProps=type.defaultProps;for(propName in defaultProps)"undefined"==typeof props[propName]&&(props[propName]=defaultProps[propName])}return new ReactElement(type,key,ref,ReactCurrentOwner.current,ReactContext.current,props)},ReactElement.createFactory=function(type){var factory=ReactElement.createElement.bind(null,type);return factory.type=type,factory},ReactElement.cloneAndReplaceProps=function(oldElement,newProps){var newElement=new ReactElement(oldElement.type,oldElement.key,oldElement.ref,oldElement._owner,oldElement._context,newProps);return"production"!==process.env.NODE_ENV&&(newElement._store.validated=oldElement._store.validated),newElement},ReactElement.cloneElement=function(element,config,children){var propName,props=assign({},element.props),key=element.key,ref=element.ref,owner=element._owner;if(null!=config){void 0!==config.ref&&(ref=config.ref,owner=ReactCurrentOwner.current),void 0!==config.key&&(key=""+config.key);for(propName in config)config.hasOwnProperty(propName)&&!RESERVED_PROPS.hasOwnProperty(propName)&&(props[propName]=config[propName])}var childrenLength=arguments.length-2;if(1===childrenLength)props.children=children;else if(childrenLength>1){for(var childArray=Array(childrenLength),i=0;childrenLength>i;i++)childArray[i]=arguments[i+2];props.children=childArray}return new ReactElement(element.type,key,ref,owner,element._context,props)},ReactElement.isValidElement=function(object){var isElement=!(!object||!object._isReactElement);return isElement},module.exports=ReactElement}).call(exports,__webpack_require__(8))},function(module,exports,__webpack_require__){"use strict";function createTransferStrategy(mergeStrategy){return function(props,key,value){props[key]=props.hasOwnProperty(key)?mergeStrategy(props[key],value):value}}function transferInto(props,newProps){for(var thisKey in newProps)if(newProps.hasOwnProperty(thisKey)){var transferStrategy=TransferStrategies[thisKey];transferStrategy&&TransferStrategies.hasOwnProperty(thisKey)?transferStrategy(props,thisKey,newProps[thisKey]):props.hasOwnProperty(thisKey)||(props[thisKey]=newProps[thisKey])}return props}var assign=__webpack_require__(11),emptyFunction=__webpack_require__(12),joinClasses=__webpack_require__(13),transferStrategyMerge=createTransferStrategy(function(a,b){return assign({},b,a)}),TransferStrategies={children:emptyFunction,className:createTransferStrategy(joinClasses),style:transferStrategyMerge},ReactPropTransferer={mergeProps:function(oldProps,newProps){return transferInto(assign({},oldProps),newProps)}};module.exports=ReactPropTransferer},function(module){var keyOf=function(oneKeyObj){var key;for(key in oneKeyObj)if(oneKeyObj.hasOwnProperty(key))return key;return null};module.exports=keyOf},function(module,exports,__webpack_require__){(function(process){"use strict";var emptyFunction=__webpack_require__(12),warning=emptyFunction;"production"!==process.env.NODE_ENV&&(warning=function(condition,format){for(var args=[],$__0=2,$__1=arguments.length;$__1>$__0;$__0++)args.push(arguments[$__0]);if(void 0===format)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(format.length<10||/^[s\W]*$/.test(format))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+format);if(0!==format.indexOf("Failed Composite propType: ")&&!condition){var argIndex=0,message="Warning: "+format.replace(/%s/g,function(){return args[argIndex++]});console.warn(message);try{throw new Error(message)}catch(x){}}}),module.exports=warning}).call(exports,__webpack_require__(8))},function(module){function noop(){}var process=module.exports={};process.nextTick=function(){var canSetImmediate="undefined"!=typeof window&&window.setImmediate,canMutationObserver="undefined"!=typeof window&&window.MutationObserver,canPost="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(canSetImmediate)return function(f){return window.setImmediate(f)};var queue=[];if(canMutationObserver){var hiddenDiv=document.createElement("div"),observer=new MutationObserver(function(){var queueList=queue.slice();queue.length=0,queueList.forEach(function(fn){fn()})});return observer.observe(hiddenDiv,{attributes:!0}),function(fn){queue.length||hiddenDiv.setAttribute("yes","no"),queue.push(fn)}}return canPost?(window.addEventListener("message",function(ev){var source=ev.source;if((source===window||null===source)&&"process-tick"===ev.data&&(ev.stopPropagation(),queue.length>0)){var fn=queue.shift();fn()}},!0),function(fn){queue.push(fn),window.postMessage("process-tick","*")}):function(fn){setTimeout(fn,0)}}(),process.title="browser",process.browser=!0,process.env={},process.argv=[],process.on=noop,process.addListener=noop,process.once=noop,process.off=noop,process.removeListener=noop,process.removeAllListeners=noop,process.emit=noop,process.binding=function(){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(){throw new Error("process.chdir is not supported")}},function(module,exports,__webpack_require__){(function(process){"use strict";var assign=__webpack_require__(11),emptyObject=__webpack_require__(14),warning=__webpack_require__(7),didWarn=!1,ReactContext={current:emptyObject,withContext:function(newContext,scopedCallback){"production"!==process.env.NODE_ENV&&("production"!==process.env.NODE_ENV?warning(didWarn,"withContext is deprecated and will be removed in a future version. Use a wrapper component with getChildContext instead."):null,didWarn=!0);var result,previousContext=ReactContext.current;ReactContext.current=assign({},previousContext,newContext);try{result=scopedCallback()}finally{ReactContext.current=previousContext}return result}};module.exports=ReactContext}).call(exports,__webpack_require__(8))},function(module){"use strict";var ReactCurrentOwner={current:null};module.exports=ReactCurrentOwner},function(module){"use strict";function assign(target){if(null==target)throw new TypeError("Object.assign target cannot be null or undefined");for(var to=Object(target),hasOwnProperty=Object.prototype.hasOwnProperty,nextIndex=1;nextIndex1)for(var ii=1;argLength>ii;ii++)nextClass=arguments[ii],nextClass&&(className=(className?className+" ":"")+nextClass);return className}module.exports=joinClasses},function(module,exports,__webpack_require__){(function(process){"use strict";var emptyObject={};"production"!==process.env.NODE_ENV&&Object.freeze(emptyObject),module.exports=emptyObject}).call(exports,__webpack_require__(8))}])}); //# sourceMappingURL=react-draggable.min.map \ No newline at end of file diff --git a/dist/react-draggable.min.map b/dist/react-draggable.min.map index 8782d7b4..3755baab 100644 --- a/dist/react-draggable.min.map +++ b/dist/react-draggable.min.map @@ -1 +1 @@ -{"version":3,"file":"dist/react-draggable.min.js","sources":["dist/react-draggable.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","createUIEvent","draggable","position","top","state","clientY","left","clientX","canDragY","props","axis","canDragX","isFunction","func","Object","prototype","toString","findInArray","array","callback","i","element","length","apply","matchesSelector","el","selector","method","getControlPosition","e","touches","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","React","emptyFunction","window","isTouchDevice","dragEventFor","eventsFor","touch","start","move","end","mouse","createClass","displayName","propTypes","PropTypes","oneOf","handle","string","cancel","grid","arrayOf","number","object","zIndex","onStart","onDrag","onStop","onMouseDown","componentWillUnmount","handleDrag","handleDragEnd","getDefaultProps","x","y","NaN","getInitialState","dragging","startX","startY","offsetX","offsetY","handleDragStart","node","getDOMNode","target","dragPoint","setState","parseInt","style","Array","isArray","directionX","directionY","Math","abs","render","isNaN","className","addons","cloneWithProps","Children","only","children","onTouchStart","ev","preventDefault","arguments","bind","onMouseUp","onTouchEnd"],"mappings":"CAAA,SAA2CA,KAAMC,SAC1B,gBAAZC,UAA0C,gBAAXC,QACxCA,OAAOD,QAAUD,QAAQG,QAAQ,UACR,kBAAXC,SAAyBA,OAAOC,IAC9CD,QAAQ,SAAUJ,SACQ,gBAAZC,SACdA,QAAwB,eAAID,QAAQG,QAAQ,UAE5CJ,KAAqB,eAAIC,QAAQD,KAAY,QAC5CO,KAAM,SAASC,+BAClB,MAAgB,UAAUC,SAKhB,QAASC,qBAAoBC,UAG5B,GAAGC,iBAAiBD,UACnB,MAAOC,kBAAiBD,UAAUT,OAGnC,IAAIC,QAASS,iBAAiBD,WAC7BT,WACAW,GAAIF,SACJG,QAAQ,EAUT,OANAL,SAAQE,UAAUI,KAAKZ,OAAOD,QAASC,OAAQA,OAAOD,QAASQ,qBAG/DP,OAAOW,QAAS,EAGTX,OAAOD,QAvBf,GAAIU,oBAqCJ,OATAF,qBAAoBM,EAAIP,QAGxBC,oBAAoBO,EAAIL,iBAGxBF,oBAAoBQ,EAAI,GAGjBR,oBAAoB,KAK/B,SAASP,OAAQD,QAASQ,qBAE/BP,OAAOD,QAAUQ,oBAAoB,IAKhC,SAASP,OAAQD,QAASQ,qBAE/B,YAMA,SAASS,eAAcC,WACtB,OACCC,UACCC,IAAKF,UAAUG,MAAMC,QACrBC,KAAML,UAAUG,MAAMG,UAKzB,QAASC,UAASP,WACjB,MAAgC,SAAzBA,UAAUQ,MAAMC,MAC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AAIxF,QAAUiF,SAASlG,KAAKgB,MAAMC,QAAS,MAAQjB,KAAKqB,MAAMiD,KAAK,GAC7E4B,SAASlG,KAAKgB,MAAMC,QAAS,IAAOjB,KAAKqB,MAAMiD,KAAK,GAAKiC,WAC1DvG,KAAKgB,MAAMC,QAIhBjB,KAAKiG,UACJ9E,QAASA,QACTF,QAASA,UAIVjB,KAAKqB,MAAMuD,OAAOnC,EAAG7B,cAAcZ,QAGpC0G,OAAQ,WACP,GAAIP,QAEHpF,IAAKK,SAASpB,MACXA,KAAKgB,MAAMC,QACXjB,KAAKgB,MAAMyE,OAGdvE,KAAMK,SAASvB,MACZA,KAAKgB,MAAMG,QACXnB,KAAKgB,MAAMwE,OAIXxF,MAAKgB,MAAMuE,WAAaoB,MAAM3G,KAAKqB,MAAMqD,UAC5CyB,MAAMzB,OAAS1E,KAAKqB,MAAMqD,OAG3B,IAAIkC,WAAY,iBAOhB,OANI5G,MAAKgB,MAAMuE,WACdqB,WAAa,6BAKPzD,MAAM0D,OAAOC,eAAe3D,MAAM4D,SAASC,KAAKhH,KAAKqB,MAAM4F,WACjEd,MAAOA,MACPS,UAAWA,UAEX9B,YAAa9E,KAAK4F,gBAClBsB,aAAc,SAASC,IAElB,MADAA,IAAGC,iBACIpH,KAAK4F,gBAAgBzD,MAAMnC,KAAMqH,YACxCC,KAAKtH,MAEVuH,UAAWvH,KAAKiF,cAChBuC,WAAYxH,KAAKiF,oBAQf,SAASrF,QAEdA,OAAOD,QAAUM"} \ No newline at end of file +{"version":3,"file":"dist/react-draggable.min.js","sources":["dist/react-draggable.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_2__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","createUIEvent","draggable","position","top","state","clientY","left","clientX","canDragY","props","axis","canDragX","isFunction","func","Object","prototype","toString","findInArray","array","callback","i","element","length","apply","matchesSelector","el","selector","method","getControlPosition","e","touches","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","React","emptyFunction","cloneWithProps","window","isTouchDevice","dragEventFor","eventsFor","touch","start","move","end","mouse","createClass","displayName","propTypes","PropTypes","oneOf","handle","string","cancel","grid","arrayOf","number","object","zIndex","onStart","onDrag","onStop","onMouseDown","componentWillUnmount","handleDrag","handleDragEnd","getDefaultProps","x","y","NaN","getInitialState","dragging","startX","startY","offsetX","offsetY","handleDragStart","node","getDOMNode","target","dragPoint","setState","parseInt","style","Array","isArray","directionX","directionY","Math","abs","render","isNaN","className","Children","only","children","onTouchStart","ev","preventDefault","arguments","bind","onMouseUp","onTouchEnd","process","child","env","NODE_ENV","warning","ref","newProps","ReactPropTransferer","mergeProps","hasOwnProperty","CHILDREN_PROP","ReactElement","createElement","type","keyOf","defineWarningProperty","key","defineProperty","configurable","enumerable","get","_store","set","value","defineMutationMembrane","pseudoFrozenProperties","useMutationMembrane","ReactContext","ReactCurrentOwner","assign","RESERVED_PROPS","owner","context","_owner","_context","originalProps","writable","validated","freeze","_isReactElement","config","propName","undefined","childrenLength","childArray","defaultProps","current","createFactory","cloneAndReplaceProps","oldElement","newElement","cloneElement","isValidElement","isElement","createTransferStrategy","mergeStrategy","transferInto","thisKey","transferStrategy","TransferStrategies","joinClasses","transferStrategyMerge","a","b","oldProps","oneKeyObj","condition","format","args","$__0","$__1","push","Error","test","indexOf","argIndex","message","replace","console","warn","noop","nextTick","canSetImmediate","setImmediate","canMutationObserver","MutationObserver","canPost","postMessage","f","queue","hiddenDiv","document","observer","queueList","slice","forEach","fn","observe","attributes","setAttribute","source","data","stopPropagation","shift","setTimeout","title","browser","argv","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","cwd","chdir","emptyObject","didWarn","withContext","newContext","scopedCallback","result","previousContext","TypeError","to","nextIndex","nextSource","from","makeEmptyFunction","arg","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","nextClass","argLength","ii"],"mappings":"CAAA,SAA2CA,KAAM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,WAAa,MAAOhQ,OACpDoD,cAAc6M,oBAAsB,SAASN,KAAO,MAAOA,MAE3D/P,OAAOD,QAAUyD,eAKZ,SAASxD,QAcd,YASA,SAASwL,aAAYvE,WACdA,YACHA,UAAY,GAEd,IAAIqJ,WACAC,UAAY/I,UAAUlF,MAC1B,IAAIiO,UAAY,EACd,IAAK,GAAIC,IAAK,EAAQD,UAALC,GAAgBA,KAC/BF,UAAY9I,UAAUgJ,IAClBF,YACFrJ,WAAaA,UAAYA,UAAY,IAAM,IAAMqJ,UAIvD,OAAOrJ,WAGTjH,OAAOD,QAAUyL,aAKZ,SAASxL,OAAQD,QAASQ,sBAEH,SAASqH,SAWrC,YAEA,IAAIsH,eAEA,gBAAiBtH,QAAQE,IAAIC,UAC/BjG,OAAOoI,OAAOgF,aAGhBlP,OAAOD,QAAUmP,cAEYtO,KAAKb,QAASQ,oBAAoB"} \ No newline at end of file diff --git a/package.json b/package.json index dcf06870..7c5b4ee7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "0.4.2", + "version": "0.4.3", "description": "React draggable component", "main": "index.js", "scripts": {