Your IP : 192.168.165.1


Current Path : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/
Upload File :
Current File : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/dragdrop.min.js.map

{"version":3,"sources":["../src/dragdrop.js"],"names":["define","$","autoScroll","dragdrop","eventCaptureOptions","passive","capture","dragProxy","onMove","onDrop","initialPosition","initialX","initialY","touching","prepare","event","preventDefault","start","type","changedTouches","length","which","details","getEventXY","xy","x","y","offset","addEventSpecial","mouseMove","mouseUp","touchEnd","touchMove","identifier","Error","scroll","handler","window","addEventListener","ex","pageX","pageY","e","i","handleMove","current","topOffset","top","parseInt","css","leftOffset","left","maxY","document","height","outerHeight","maxX","width","outerWidth","initial","position","Math","max","min","handleEnd","removeEventListener","stop","currentPosition"],"mappings":"AA6BAA,OAAM,iBAAC,CAAC,QAAD,CAAW,iBAAX,CAAD,CAAgC,SAASC,CAAT,CAAYC,CAAZ,CAAwB,CAI1D,GAAIC,CAAAA,CAAQ,CAAG,CAKXC,mBAAmB,CAAE,CAACC,OAAO,GAAR,CAAiBC,OAAO,GAAxB,CALV,CAWXC,SAAS,CAAE,IAXA,CAiBXC,MAAM,CAAE,IAjBG,CAuBXC,MAAM,CAAE,IAvBG,CA4BXC,eAAe,CAAE,IA5BN,CAiCXC,QAAQ,CAAE,IAjCC,CAsCXC,QAAQ,CAAE,IAtCC,CA2CXC,QAAQ,CAAE,IA3CC,CAwDXC,OAAO,CAAE,iBAASC,CAAT,CAAgB,CACrBA,CAAK,CAACC,cAAN,GACA,GAAIC,CAAAA,CAAJ,CACA,GAAmB,YAAf,GAAAF,CAAK,CAACG,IAAV,CAAiC,CAG7BD,CAAK,CAA0B,IAAtB,GAAAd,CAAQ,CAACU,QAAV,EAA8D,CAA9B,CAAAE,CAAK,CAACI,cAAN,CAAqBC,MAChE,CAJD,IAIO,CAEHH,CAAK,CAAmB,CAAhB,GAAAF,CAAK,CAACM,KACjB,CACD,GAAIJ,CAAJ,CAAW,CACP,GAAIK,CAAAA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B,mBAAP,CAA2B,WAA3B,CAAwC9D,CAAQ,CAAC6B,SAAjD,CAA4D7B,CAAQ,CAACC,mBAArE,EACAD,CAAQ,CAACU,QAAT,CAAoB,IACvB,CALD,IAKO,CACHwB,MAAM,CAAC4B,mBAAP,CAA2B,WAA3B,CAAwC9D,CAAQ,CAAC0B,SAAjD,CAA4D1B,CAAQ,CAACC,mBAArE,EACAiC,MAAM,CAAC4B,mBAAP,CAA2B,SAA3B,CAAsC9D,CAAQ,CAAC2B,OAA/C,CAAwD3B,CAAQ,CAACC,mBAAjE,CACH,CACDF,CAAU,CAACgE,IAAX,GACA/D,CAAQ,CAACM,MAAT,CAAgB+B,CAAhB,CAAuBC,CAAvB,CAA8BtC,CAAQ,CAACI,SAAvC,CACH,CA/PU,CAuQX4B,MAAM,CAAE,gBAASR,CAAT,CAAiB,IAEjByB,CAAAA,CAAI,CAAGnD,CAAC,CAACoD,QAAD,CAAD,CAAYC,MAAZ,GAAuBnD,CAAQ,CAACI,SAAT,CAAmBgD,WAAnB,EAFb,CAGjBY,CAAe,CAAGhE,CAAQ,CAACI,SAAT,CAAmBoB,MAAnB,EAHD,CAIrBwC,CAAe,CAACpB,GAAhB,CAAsBc,IAAI,CAACE,GAAL,CAASX,CAAT,CAAee,CAAe,CAACpB,GAAhB,CAAsBpB,CAArC,CAAtB,CACAxB,CAAQ,CAACI,SAAT,CAAmB0C,GAAnB,CAAuBkB,CAAvB,CACH,CA7QU,CAAf,CAgRA,MAAO,CAWHrD,OAAO,CAAEX,CAAQ,CAACW,OAXf,CAgCHG,KAAK,CAAEd,CAAQ,CAACc,KAhCb,CAkCV,CAtTK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.\n\n/*\n * JavaScript to handle drag operations, including automatic scrolling.\n *\n * Note: this module is defined statically. It is a singleton. You\n * can only have one use of it active at any time. However, you\n * can only drag one thing at a time, this is not a problem in practice.\n *\n * @module     core/dragdrop\n * @class      dragdrop\n * @package    core\n * @copyright  2016 The Open University\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since      3.6\n */\ndefine(['jquery', 'core/autoscroll'], function($, autoScroll) {\n    /**\n     * @alias module:core/dragdrop\n     */\n    var dragdrop = {\n        /**\n         * A boolean or options argument depending on whether browser supports passive events.\n         * @private\n         */\n        eventCaptureOptions: {passive: false, capture: true},\n\n        /**\n         * Drag proxy if any.\n         * @private\n         */\n        dragProxy: null,\n\n        /**\n         * Function called on move.\n         * @private\n         */\n        onMove: null,\n\n        /**\n         * Function called on drop.\n         * @private\n         */\n        onDrop: null,\n\n        /**\n         * Initial position of proxy at drag start.\n         */\n        initialPosition: null,\n\n        /**\n         * Initial page X of cursor at drag start.\n         */\n        initialX: null,\n\n        /**\n         * Initial page Y of cursor at drag start.\n         */\n        initialY: null,\n\n        /**\n         * If touch event is in progress, this will be the id, otherwise null\n         */\n        touching: null,\n\n        /**\n         * Prepares to begin a drag operation - call with a mousedown or touchstart event.\n         *\n         * If the returned object has 'start' true, then you can set up a drag proxy, and call\n         * start. This function will call preventDefault automatically regardless of whether\n         * starting or not.\n         *\n         * @public\n         * @param {Object} event Event (should be either mousedown or touchstart)\n         * @return {Object} Object with start (boolean flag) and x, y (only if flag true) values\n         */\n        prepare: function(event) {\n            event.preventDefault();\n            var start;\n            if (event.type === 'touchstart') {\n                // For touch, start if there's at least one touch and we are not currently doing\n                // a touch event.\n                start = (dragdrop.touching === null) && event.changedTouches.length > 0;\n            } else {\n                // For mousedown, start if it's the left button.\n                start = event.which === 1;\n            }\n            if (start) {\n                var details = dragdrop.getEventXY(event);\n                details.start = true;\n                return details;\n            } else {\n                return {start: false};\n            }\n        },\n\n        /**\n         * Call to start a drag operation, in response to a mouse down or touch start event.\n         * Normally call this after calling prepare and receiving start true (you can probably\n         * skip prepare if only supporting drag not touch).\n         *\n         * Note: The caller is responsible for creating a 'drag proxy' which is the\n         * thing that actually gets dragged. At present, this doesn't really work\n         * properly unless it is added directly within the body tag.\n         *\n         * You also need to ensure that there is CSS so the proxy is absolutely positioned,\n         * and styled to look like it is floating.\n         *\n         * You also need to absolutely position the proxy where you want it to start.\n         *\n         * @public\n         * @param {Object} event Event (should be either mousedown or touchstart)\n         * @param {jQuery} dragProxy An absolute-positioned element for dragging\n         * @param {Object} onMove Function that receives X and Y page locations for a move\n         * @param {Object} onDrop Function that receives X and Y page locations when dropped\n         */\n        start: function(event, dragProxy, onMove, onDrop) {\n            var xy = dragdrop.getEventXY(event);\n            dragdrop.initialX = xy.x;\n            dragdrop.initialY = xy.y;\n            dragdrop.initialPosition = dragProxy.offset();\n            dragdrop.dragProxy = dragProxy;\n            dragdrop.onMove = onMove;\n            dragdrop.onDrop = onDrop;\n\n            switch (event.type) {\n                case 'mousedown':\n                    // Cannot use jQuery 'on' because events need to not be passive.\n                    dragdrop.addEventSpecial('mousemove', dragdrop.mouseMove);\n                    dragdrop.addEventSpecial('mouseup', dragdrop.mouseUp);\n                    break;\n                case 'touchstart':\n                    dragdrop.addEventSpecial('touchend', dragdrop.touchEnd);\n                    dragdrop.addEventSpecial('touchcancel', dragdrop.touchEnd);\n                    dragdrop.addEventSpecial('touchmove', dragdrop.touchMove);\n                    dragdrop.touching = event.changedTouches[0].identifier;\n                    break;\n                default:\n                    throw new Error('Unexpected event type: ' + event.type);\n            }\n            autoScroll.start(dragdrop.scroll);\n        },\n\n        /**\n         * Adds an event listener with special event capture options (capture, not passive). If the\n         * browser does not support passive events, it will fall back to the boolean for capture.\n         *\n         * @private\n         * @param {Object} event Event type string\n         * @param {Object} handler Handler function\n         */\n        addEventSpecial: function(event, handler) {\n            try {\n                window.addEventListener(event, handler, dragdrop.eventCaptureOptions);\n            } catch (ex) {\n                dragdrop.eventCaptureOptions = true;\n                window.addEventListener(event, handler, dragdrop.eventCaptureOptions);\n            }\n        },\n\n        /**\n         * Gets X/Y co-ordinates of an event, which can be either touchstart or mousedown.\n         *\n         * @private\n         * @param {Object} event Event (should be either mousedown or touchstart)\n         * @return {Object} X/Y co-ordinates\n         */\n        getEventXY: function(event) {\n            switch (event.type) {\n                case 'touchstart':\n                    return {x: event.changedTouches[0].pageX,\n                            y: event.changedTouches[0].pageY};\n                case 'mousedown':\n                    return {x: event.pageX, y: event.pageY};\n                default:\n                    throw new Error('Unexpected event type: ' + event.type);\n            }\n        },\n\n        /**\n         * Event handler for touch move.\n         *\n         * @private\n         * @param {Object} e Event\n         */\n        touchMove: function(e) {\n            e.preventDefault();\n            for (var i = 0; i < e.changedTouches.length; i++) {\n                if (e.changedTouches[i].identifier === dragdrop.touching) {\n                    dragdrop.handleMove(e.changedTouches[i].pageX, e.changedTouches[i].pageY);\n                }\n            }\n        },\n\n        /**\n         * Event handler for mouse move.\n         *\n         * @private\n         * @param {Object} e Event\n         */\n        mouseMove: function(e) {\n            dragdrop.handleMove(e.pageX, e.pageY);\n        },\n\n        /**\n         * Shared handler for move event (mouse or touch).\n         *\n         * @private\n         * @param {number} pageX X co-ordinate\n         * @param {number} pageY Y co-ordinate\n         */\n        handleMove: function(pageX, pageY) {\n            // Move the drag proxy, not letting you move it out of screen or window bounds.\n            var current = dragdrop.dragProxy.offset();\n            var topOffset = current.top - parseInt(dragdrop.dragProxy.css('top'));\n            var leftOffset = current.left - parseInt(dragdrop.dragProxy.css('left'));\n            var maxY = $(document).height() - dragdrop.dragProxy.outerHeight() - topOffset;\n            var maxX = $(document).width() - dragdrop.dragProxy.outerWidth() - leftOffset;\n            var minY = -topOffset;\n            var minX = -leftOffset;\n            var initial = dragdrop.initialPosition;\n            var position = {\n                top: Math.max(minY, Math.min(maxY, initial.top + (pageY - dragdrop.initialY) - topOffset)),\n                left: Math.max(minX, Math.min(maxX, initial.left + (pageX - dragdrop.initialX) - leftOffset))\n            };\n            dragdrop.dragProxy.css(position);\n\n            // Trigger move handler.\n            dragdrop.onMove(pageX, pageY, dragdrop.dragProxy);\n        },\n\n        /**\n         * Event handler for touch end.\n         *\n         * @private\n         * @param {Object} e Event\n         */\n        touchEnd: function(e) {\n            e.preventDefault();\n            for (var i = 0; i < e.changedTouches.length; i++) {\n                if (e.changedTouches[i].identifier === dragdrop.touching) {\n                    dragdrop.handleEnd(e.changedTouches[i].pageX, e.changedTouches[i].pageY);\n                }\n            }\n        },\n\n        /**\n         * Event handler for mouse up.\n         *\n         * @private\n         * @param {Object} e Event\n         */\n        mouseUp: function(e) {\n            dragdrop.handleEnd(e.pageX, e.pageY);\n        },\n\n        /**\n         * Shared handler for end drag (mouse or touch).\n         *\n         * @private\n         * @param {number} pageX X\n         * @param {number} pageY Y\n         */\n        handleEnd: function(pageX, pageY) {\n            if (dragdrop.touching !== null) {\n                window.removeEventListener('touchend', dragdrop.touchEnd, dragdrop.eventCaptureOptions);\n                window.removeEventListener('touchcancel', dragdrop.touchEnd, dragdrop.eventCaptureOptions);\n                window.removeEventListener('touchmove', dragdrop.touchMove, dragdrop.eventCaptureOptions);\n                dragdrop.touching = null;\n            } else {\n                window.removeEventListener('mousemove', dragdrop.mouseMove, dragdrop.eventCaptureOptions);\n                window.removeEventListener('mouseup', dragdrop.mouseUp, dragdrop.eventCaptureOptions);\n            }\n            autoScroll.stop();\n            dragdrop.onDrop(pageX, pageY, dragdrop.dragProxy);\n        },\n\n        /**\n         * Called when the page scrolls.\n         *\n         * @private\n         * @param {number} offset Amount of scroll\n         */\n        scroll: function(offset) {\n            // Move the proxy to match.\n            var maxY = $(document).height() - dragdrop.dragProxy.outerHeight();\n            var currentPosition = dragdrop.dragProxy.offset();\n            currentPosition.top = Math.min(maxY, currentPosition.top + offset);\n            dragdrop.dragProxy.css(currentPosition);\n        }\n    };\n\n    return {\n        /**\n         * Prepares to begin a drag operation - call with a mousedown or touchstart event.\n         *\n         * If the returned object has 'start' true, then you can set up a drag proxy, and call\n         * start. This function will call preventDefault automatically regardless of whether\n         * starting or not.\n         *\n         * @param {Object} event Event (should be either mousedown or touchstart)\n         * @return {Object} Object with start (boolean flag) and x, y (only if flag true) values\n         */\n        prepare: dragdrop.prepare,\n\n        /**\n         * Call to start a drag operation, in response to a mouse down or touch start event.\n         * Normally call this after calling prepare and receiving start true (you can probably\n         * skip prepare if only supporting drag not touch).\n         *\n         * Note: The caller is responsible for creating a 'drag proxy' which is the\n         * thing that actually gets dragged. At present, this doesn't really work\n         * properly unless it is added directly within the body tag.\n         *\n         * You also need to ensure that there is CSS so the proxy is absolutely positioned,\n         * and styled to look like it is floating.\n         *\n         * You also need to absolutely position the proxy where you want it to start.\n         *\n         * @param {Object} event Event (should be either mousedown or touchstart)\n         * @param {jQuery} dragProxy An absolute-positioned element for dragging\n         * @param {Object} onMove Function that receives X and Y page locations for a move\n         * @param {Object} onDrop Function that receives X and Y page locations when dropped\n         */\n        start: dragdrop.start\n    };\n});\n"],"file":"dragdrop.min.js"}