From ba038c1cb5d2999605e85fa6df616443af981a96 Mon Sep 17 00:00:00 2001 From: mzabriskie Date: Sat, 3 Jan 2015 00:00:22 -0700 Subject: [PATCH] Releasing 0.4.0 --- CHANGELOG.md | 10 +- bower.json | 2 +- dist/react-draggable.js | 199 +++++++---------------------------- dist/react-draggable.map | 2 +- dist/react-draggable.min.js | 2 +- dist/react-draggable.min.map | 2 +- package.json | 2 +- 7 files changed, 51 insertions(+), 168 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1220b5b6..82cf4a82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,4 +22,12 @@ ### 0.3.0 (Oct 21, 2014) -- Adding support for touch devices \ No newline at end of file +- Adding support for touch devices + +### 0.4.0 (Jan 03, 2015) + +- Improving accuracy of snap to grid +- Updating to React 0.12 +- Adding dragging className +- Adding reactify support for browserify +- Fixing issue with server side rendering diff --git a/bower.json b/bower.json index 4fd9d787..eeabb363 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "0.3.0", + "version": "0.4.0", "homepage": "https://github.com/mzabriskie/react-draggable", "authors": [ "Matt Zabriskie" diff --git a/dist/react-draggable.js b/dist/react-draggable.js index 202c5fa3..190ca406 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 = __webpack_require__(3); + var CX = React.addons.classSet; function createUIEvent(draggable) { return { @@ -112,9 +113,17 @@ return /******/ (function(modules) { // webpackBootstrap } // @credits: http://stackoverflow.com/questions/4817029/whats-the-best-way-to-detect-a-touch-screen-device-using-javascript/4819886#4819886 - var isTouchDevice = 'ontouchstart' in window // works on most browsers + /* Conditional to fix node server side rendering of component */ + if (typeof window === 'undefined') { + // Do Node Stuff + var isTouchDevice = false; + } else { + // Do Browser Stuff + var isTouchDevice = 'ontouchstart' in window // works on most browsers || 'onmsgesturechange' in window; // works on ie10 on ms surface + } + // look ::handleDragStart //function isMultiTouch(e) { // return e.touches && Array.isArray(e.touches) && e.touches.length > 1 @@ -419,8 +428,8 @@ return /******/ (function(modules) { // webpackBootstrap // Initiate dragging this.setState({ dragging: true, - offsetX: dragPoint.clientX, - offsetY: dragPoint.clientY, + offsetX: parseInt(dragPoint.clientX, 10), + offsetY: parseInt(dragPoint.clientY, 10), startX: parseInt(node.style.left, 10) || 0, startY: parseInt(node.style.top, 10) || 0 }); @@ -461,12 +470,15 @@ return /******/ (function(modules) { // webpackBootstrap // Snap to grid if prop has been provided if (Array.isArray(this.props.grid)) { - clientX = Math.abs(clientX - this.state.clientX) >= this.props.grid[0] - ? clientX + var directionX = clientX < parseInt(this.state.clientX, 10) ? -1 : 1; + var directionY = clientY < parseInt(this.state.clientY, 10) ? -1 : 1; + + clientX = Math.abs(clientX - parseInt(this.state.clientX, 10)) >= this.props.grid[0] + ? (parseInt(this.state.clientX, 10) + (this.props.grid[0] * directionX)) : this.state.clientX; - clientY = Math.abs(clientY - this.state.clientY) >= this.props.grid[1] - ? clientY + 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; } @@ -497,12 +509,16 @@ return /******/ (function(modules) { // webpackBootstrap if (this.state.dragging && !isNaN(this.props.zIndex)) { style.zIndex = this.props.zIndex; } - + + var className = CX({ + 'react-draggable': true, + 'react-draggable-dragging': this.state.dragging + }); // 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), { style: style, - className: 'react-draggable', + className: className, onMouseDown: this.handleDragStart, onTouchStart: function(ev){ @@ -528,25 +544,16 @@ return /******/ (function(modules) { // webpackBootstrap /***/ function(module, exports, __webpack_require__) { /** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * Copyright 2013-2014, Facebook, Inc. + * All rights reserved. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * 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 */ - var copyProperties = __webpack_require__(4); - function makeEmptyFunction(arg) { return function() { return arg; @@ -560,150 +567,18 @@ return /******/ (function(modules) { // webpackBootstrap */ function emptyFunction() {} - copyProperties(emptyFunction, { - thatReturns: makeEmptyFunction, - thatReturnsFalse: makeEmptyFunction(false), - thatReturnsTrue: makeEmptyFunction(true), - thatReturnsNull: makeEmptyFunction(null), - thatReturnsThis: function() { return this; }, - thatReturnsArgument: function(arg) { return arg; } - }); + 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; -/***/ }, -/* 4 */ -/***/ function(module, exports, __webpack_require__) { - - /* WEBPACK VAR INJECTION */(function(process) {/** - * Copyright 2013-2014 Facebook, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @providesModule copyProperties - */ - - /** - * Copy properties from one or more objects (up to 5) into the first object. - * This is a shallow copy. It mutates the first object and also returns it. - * - * NOTE: `arguments` has a very significant performance penalty, which is why - * we don't support unlimited arguments. - */ - function copyProperties(obj, a, b, c, d, e, f) { - obj = obj || {}; - - if ("production" !== process.env.NODE_ENV) { - if (f) { - throw new Error('Too many arguments passed to copyProperties'); - } - } - - var args = [a, b, c, d, e]; - var ii = 0, v; - while (args[ii]) { - v = args[ii++]; - for (var k in v) { - obj[k] = v[k]; - } - - // IE ignores toString in object iteration.. See: - // webreflection.blogspot.com/2007/07/quick-fix-internet-explorer-and.html - if (v.hasOwnProperty && v.hasOwnProperty('toString') && - (typeof v.toString != 'undefined') && (obj.toString !== v.toString)) { - obj.toString = v.toString; - } - } - - return obj; - } - - module.exports = copyProperties; - - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) - -/***/ }, -/* 5 */ -/***/ 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 canPost = typeof window !== 'undefined' - && window.postMessage && window.addEventListener - ; - - if (canSetImmediate) { - return function (f) { return window.setImmediate(f) }; - } - - if (canPost) { - var queue = []; - 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'); - }; - - /***/ } /******/ ]) -}) +}); //# sourceMappingURL=react-draggable.map \ No newline at end of file diff --git a/dist/react-draggable.map b/dist/react-draggable.map index 745f19e4..f5160196 100644 --- a/dist/react-draggable.map +++ b/dist/react-draggable.map @@ -1 +1 @@ -{"version":3,"file":"./dist/react-draggable.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap a2f9fdb08d6684f601ee","webpack:///./index.js","webpack:///./lib/draggable.js","webpack:///external \"React\"","webpack:///./~/react/lib/emptyFunction.js","webpack:///./~/react/lib/copyProperties.js","webpack:///(webpack)/~/node-libs-browser/~/process/browser.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;;;;;;CCtCA;;;;;CCAA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,yDAAwD,gCAAgC;AACxF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA,sCAAqC;;AAErC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA,SAAQ,iBAAiB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAW,QAAQ;AACnB;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA,YAAW,QAAQ;AACnB;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAmC,SAAS;AAC5C;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,cAAc;AACnD,oDAAmD,WAAW;AAC9D;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAqC,IAAI;AACzC;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA4B;AAC5B;AACA,QAAO;;AAEP;AACA;AACA,IAAG;AACH;AACA,EAAC;;;;;CCrcD,gD;;;;CCAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8CAA6C;AAC7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gCAA+B,aAAa,EAAE;AAC9C,uCAAsC,YAAY;AAClD,EAAC;;AAED;;;;;CC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;CCrDA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA6B;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAS;;AAET;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,4BAA2B;AAC3B;AACA;AACA","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 a2f9fdb08d6684f601ee\n **/","module.exports = require('./lib/draggable');\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./index.js\n ** module id = 0\n ** module chunks = 0\n **/","'use strict';\n\n/** @jsx React.DOM */\nvar React = require('react/addons');\nvar emptyFunction = require('react/lib/emptyFunction');\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\nvar isTouchDevice = 'ontouchstart' in window // works on most browsers\n || 'onmsgesturechange' in window; // works on ie10 on ms surface\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 = !isTouchDevice ? e : e.touches[0];\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: dragPoint.clientX,\n\t\t\toffsetY: dragPoint.clientY,\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\tclientX = Math.abs(clientX - this.state.clientX) >= this.props.grid[0]\n\t\t\t\t\t? clientX\n\t\t\t\t\t: this.state.clientX;\n\n\t\t\tclientY = Math.abs(clientY - this.state.clientY) >= this.props.grid[1]\n\t\t\t\t\t? clientY\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\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: 'react-draggable',\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/*****************\n ** WEBPACK FOOTER\n ** ./lib/draggable.js\n ** module id = 1\n ** module chunks = 0\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-2014 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @providesModule emptyFunction\n */\n\nvar copyProperties = require(\"./copyProperties\");\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\ncopyProperties(emptyFunction, {\n thatReturns: makeEmptyFunction,\n thatReturnsFalse: makeEmptyFunction(false),\n thatReturnsTrue: makeEmptyFunction(true),\n thatReturnsNull: makeEmptyFunction(null),\n thatReturnsThis: function() { return this; },\n thatReturnsArgument: function(arg) { return arg; }\n});\n\nmodule.exports = emptyFunction;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react/lib/emptyFunction.js\n ** module id = 3\n ** module chunks = 0\n **/","/**\n * Copyright 2013-2014 Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @providesModule copyProperties\n */\n\n/**\n * Copy properties from one or more objects (up to 5) into the first object.\n * This is a shallow copy. It mutates the first object and also returns it.\n *\n * NOTE: `arguments` has a very significant performance penalty, which is why\n * we don't support unlimited arguments.\n */\nfunction copyProperties(obj, a, b, c, d, e, f) {\n obj = obj || {};\n\n if (\"production\" !== process.env.NODE_ENV) {\n if (f) {\n throw new Error('Too many arguments passed to copyProperties');\n }\n }\n\n var args = [a, b, c, d, e];\n var ii = 0, v;\n while (args[ii]) {\n v = args[ii++];\n for (var k in v) {\n obj[k] = v[k];\n }\n\n // IE ignores toString in object iteration.. See:\n // webreflection.blogspot.com/2007/07/quick-fix-internet-explorer-and.html\n if (v.hasOwnProperty && v.hasOwnProperty('toString') &&\n (typeof v.toString != 'undefined') && (obj.toString !== v.toString)) {\n obj.toString = v.toString;\n }\n }\n\n return obj;\n}\n\nmodule.exports = copyProperties;\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/react/lib/copyProperties.js\n ** module id = 4\n ** module chunks = 0\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 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 if (canPost) {\n var queue = [];\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/*****************\n ** WEBPACK FOOTER\n ** (webpack)/~/node-libs-browser/~/process/browser.js\n ** module id = 5\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 52a4acfee09d3e228d51","webpack:///./index.js","webpack:///./lib/draggable.js","webpack:///external \"React\"","webpack:///./~/react/lib/emptyFunction.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,CAAc,CAAC,CAAC;AACpC,KAAI,aAAa,GAAG,mBAAO,CAAC,CAAyB,CAAC,CAAC;AACvD,KAAI,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC;;AAE/B,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,CAAC;AAChC,EAAC;;AAED,UAAS,QAAQ,CAAC,SAAS,EAAE;EAC5B,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,MAAM;IACpC,SAAS,CAA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AW,CAAC,IAAI,GAAG,KAAK,EAAE,OAAO,CAAC,CAAC;GACtC,MAAM,IAAI,EAAE,CAAC,mBAAmB,EAAE;GAClC,EAAE,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;GAC7C,MAAM;GACN,EAAE,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC;GACxB;AACF,EAAC;;AAED,OAAM,CAAC,OAAO,GAAG,KAAK,CAAC,WAAW,CAAC;AACnC,EAAC,WAAW,EAAE,WAAW;;AAEzB,EAAC,SAAS,EAAE;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACjD;AACA;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;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;;AA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CAAC;;;;;;;ACrdH,gD;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAG;;AAEH,UAAS,iBAAiB,CAAC,GAAG,EAAE;GAC9B,OAAO,WAAW;KAChB,OAAO,GAAG,CAAC;IACZ,CAAC;AACJ,EAAC;;AAED;AACA;AACA;;IAEG;AACH,UAAS,aAAa,GAAG,EAAE;;AAE3B,cAAa,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAC9C,cAAa,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAC1D,cAAa,CAAC,eAAe,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACxD,cAAa,CAAC,eAAe,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACxD,cAAa,CAAC,eAAe,GAAG,WAAW,EAAE,OAAO,IAAI,CAAC,EAAE,CAAC;AAC5D,cAAa,CAAC,mBAAmB,GAAG,SAAS,GAAG,EAAE,EAAE,OAAO,GAAG,CAAC,EAAE,CAAC;;AAElE,OAAM,CAAC,OAAO,GAAG,aAAa,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 52a4acfee09d3e228d51\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/addons');\nvar emptyFunction = require('react/lib/emptyFunction');\nvar CX = React.addons.classSet;\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 = !isTouchDevice ? e : e.touches[0];\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\t\t\n\t\tvar className = CX({\n\t\t\t'react-draggable': true,\n\t\t\t'react-draggable-dragging': this.state.dragging\n\t\t});\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 **/","/**\n * Copyright 2013-2014, 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 **/"],"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 6c1e7496..18b1f612 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=isTouchDevice?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=__webpack_require__(3),isTouchDevice="ontouchstart"in window||"onmsgesturechange"in window,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:dragPoint.clientX,offsetY:dragPoint.clientY,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);Array.isArray(this.props.grid)&&(clientX=Math.abs(clientX-this.state.clientX)>=this.props.grid[0]?clientX:this.state.clientX,clientY=Math.abs(clientY-this.state.clientY)>=this.props.grid[1]?clientY: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};return this.state.dragging&&!isNaN(this.props.zIndex)&&(style.zIndex=this.props.zIndex),React.addons.cloneWithProps(React.Children.only(this.props.children),{style:style,className:"react-draggable",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 makeEmptyFunction(arg){return function(){return arg}}function emptyFunction(){}var copyProperties=__webpack_require__(4);copyProperties(emptyFunction,{thatReturns:makeEmptyFunction,thatReturnsFalse:makeEmptyFunction(!1),thatReturnsTrue:makeEmptyFunction(!0),thatReturnsNull:makeEmptyFunction(null),thatReturnsThis:function(){return this},thatReturnsArgument:function(arg){return arg}}),module.exports=emptyFunction},function(module,exports,__webpack_require__){(function(process){function copyProperties(obj,a,b,c,d,e,f){if(obj=obj||{},"production"!==process.env.NODE_ENV&&f)throw new Error("Too many arguments passed to copyProperties");for(var v,args=[a,b,c,d,e],ii=0;args[ii];){v=args[ii++];for(var k in v)obj[k]=v[k];v.hasOwnProperty&&v.hasOwnProperty("toString")&&"undefined"!=typeof v.toString&&obj.toString!==v.toString&&(obj.toString=v.toString)}return obj}module.exports=copyProperties}).call(exports,__webpack_require__(5))},function(module){function noop(){}var process=module.exports={};process.nextTick=function(){var canSetImmediate="undefined"!=typeof window&&window.setImmediate,canPost="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(canSetImmediate)return function(f){return window.setImmediate(f)};if(canPost){var queue=[];return 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","*")}}return 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(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=isTouchDevice?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=__webpack_require__(3),CX=React.addons.classSet;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=CX({"react-draggable":!0,"react-draggable-dragging":this.state.dragging});return 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(module){function makeEmptyFunction(arg){return function(){return arg}}function emptyFunction(){}emptyFunction.thatReturns=makeEmptyFunction,emptyFunction.thatReturnsFalse=makeEmptyFunction(!1),emptyFunction.thatReturnsTrue=makeEmptyFunction(!0),emptyFunction.thatReturnsNull=makeEmptyFunction(null),emptyFunction.thatReturnsThis=function(){return this},emptyFunction.thatReturnsArgument=function(arg){return arg},module.exports=emptyFunction}])}); //# 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 6e15dc46..eb383382 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","isTouchDevice","touches","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","React","emptyFunction","window","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","Math","abs","render","isNaN","addons","cloneWithProps","Children","only","children","className","onTouchStart","ev","preventDefault","arguments","bind","onMouseUp","onTouchEnd","makeEmptyFunction","arg","copyProperties","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument","process","obj","a","b","d","f","env","NODE_ENV","Error","v","args","ii","k","hasOwnProperty","noop","nextTick","canSetImmediate","setImmediate","canPost","postMessage","queue","source","data","stopPropagation","fn","shift","push","setTimeout","title","browser","argv","on","addListener","once","off","removeListener","removeAllListeners","emit","binding","cwd","chdir"],"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,MACI,MAAzBT,UAAUQ,MAAMC,KAGnB,QAASC,UAASV,WACjB,MAAgC,SAAzBA,UAAUQ,MAAMC,MACI,MAAzBT,UAAUQ,MAAMC,KAGnB,QAASE,YAAWC,MAClB,MAAuB,kBAATA,OAAgE,sBAAzCC,OAAOC,UAAUC,SAASpB,KAAKiB,MAItE,QAASI,aAAYC,MAAOC,UAC1B,IAAK,GAAIC,GAAI,EAA0BC,SAAdH,MAAMI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mBAAX5F,SAClBA,OAAO6F,aAAe7F,OAAON,gBAGhC,IAAIgG,gBACA,MAAO,UAAUX,GAAK,MAAO/E,QAAO2F,aAAaZ,GAGrD,IAAIa,QAAS,CACT,GAAIE,SAYJ,OAXA9F,QAAON,iBAAiB,UAAW,SAAUiE,IACzC,GAAIoC,QAASpC,GAAGoC,MAChB,KAAKA,SAAW/F,QAAqB,OAAX+F,SAAgC,iBAAZpC,GAAGqC,OAC7CrC,GAAGsC,kBACCH,MAAMlH,OAAS,GAAG,CAClB,GAAIsH,IAAKJ,MAAMK,OACfD,SAGT,GAEI,SAAkBA,IACrBJ,MAAMM,KAAKF,IACXlG,OAAO6F,YAAY,eAAgB,MAI3C,MAAO,UAAkBK,IACrBG,WAAWH,GAAI,OAIvBxB,QAAQ4B,MAAQ,UAChB5B,QAAQ6B,SAAU,EAClB7B,QAAQM,OACRN,QAAQ8B,QAIR9B,QAAQ+B,GAAKjB,KACbd,QAAQgC,YAAclB,KACtBd,QAAQiC,KAAOnB,KACfd,QAAQkC,IAAMpB,KACdd,QAAQmC,eAAiBrB,KACzBd,QAAQoC,mBAAqBtB,KAC7Bd,QAAQqC,KAAOvB,KAEfd,QAAQsC,QAAU,WACd,KAAM,IAAI9B,OAAM,qCAIpBR,QAAQuC,IAAM,WAAc,MAAO,KACnCvC,QAAQwC,MAAQ,WACZ,KAAM,IAAIhC,OAAM"} \ 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","isTouchDevice","touches","addEvent","event","handler","attachEvent","addEventListener","removeEvent","detachEvent","removeEventListener","React","emptyFunction","CX","addons","classSet","window","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","react-draggable","react-draggable-dragging","cloneWithProps","Children","only","children","onTouchStart","ev","preventDefault","arguments","bind","onMouseUp","onTouchEnd","makeEmptyFunction","arg","thatReturns","thatReturnsFalse","thatReturnsTrue","thatReturnsNull","thatReturnsThis","thatReturnsArgument"],"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,YAOA,SAASS,eAAcC,WACtB,OACCC,UACCC,IAAKF,UAAUG,MAAMC,Q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BAAkBJ,mBAAkB,GAClDxE,cAAc6E,gBAAkBL,kBAAkB,MAClDxE,cAAc8E,gBAAkB,WAAa,MAAOnI,OACpDqD,cAAc+E,oBAAsB,SAASN,KAAO,MAAOA,MAE3DlI,OAAOD,QAAU0D"} \ No newline at end of file diff --git a/package.json b/package.json index 744c92ae..6a5eac90 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-draggable", - "version": "0.3.0", + "version": "0.4.0", "description": "React draggable component", "main": "index.js", "scripts": {