~ubuntu-branches/ubuntu/utopic/moodle/utopic

« back to all changes in this revision

Viewing changes to lib/yuilib/3.13.0/dd-scroll/dd-scroll-coverage.js

  • Committer: Package Import Robot
  • Author(s): Thijs Kinkhorst
  • Date: 2014-05-12 16:10:38 UTC
  • mfrom: (36.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140512161038-puyqf65k4e0s8ytz
Tags: 2.6.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
YUI 3.13.0 (build 508226d)
 
3
Copyright 2013 Yahoo! Inc. All rights reserved.
 
4
Licensed under the BSD License.
 
5
http://yuilibrary.com/license/
 
6
*/
 
7
 
 
8
if (typeof __coverage__ === 'undefined') { __coverage__ = {}; }
 
9
if (!__coverage__['build/dd-scroll/dd-scroll.js']) {
 
10
   __coverage__['build/dd-scroll/dd-scroll.js'] = {"path":"build/dd-scroll/dd-scroll.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0,"41":0,"42":0,"43":0,"44":0,"45":0,"46":0,"47":0,"48":0,"49":0,"50":0,"51":0,"52":0,"53":0,"54":0,"55":0,"56":0,"57":0,"58":0,"59":0,"60":0,"61":0,"62":0,"63":0,"64":0,"65":0,"66":0,"67":0,"68":0,"69":0,"70":0,"71":0,"72":0,"73":0,"74":0,"75":0,"76":0,"77":0,"78":0,"79":0,"80":0,"81":0,"82":0,"83":0,"84":0,"85":0,"86":0,"87":0,"88":0,"89":0,"90":0,"91":0,"92":0,"93":0,"94":0,"95":0,"96":0,"97":0,"98":0,"99":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0],"27":[0,0],"28":[0,0],"29":[0,0],"30":[0,0]},"f":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":21},"end":{"line":1,"column":40}}},"2":{"name":"(anonymous_2)","line":19,"loc":{"start":{"line":19,"column":12},"end":{"line":19,"column":23}}},"3":{"name":"(anonymous_3)","line":43,"loc":{"start":{"line":43,"column":20},"end":{"line":43,"column":35}}},"4":{"name":"(anonymous_4)","line":139,"loc":{"start":{"line":139,"column":22},"end":{"line":139,"column":33}}},"5":{"name":"(anonymous_5)","line":159,"loc":{"start":{"line":159,"column":21},"end":{"line":159,"column":32}}},"6":{"name":"(anonymous_6)","line":166,"loc":{"start":{"line":166,"column":45},"end":{"line":166,"column":56}}},"7":{"name":"(anonymous_7)","line":176,"loc":{"start":{"line":176,"column":25},"end":{"line":176,"column":40}}},"8":{"name":"(anonymous_8)","line":261,"loc":{"start":{"line":261,"column":21},"end":{"line":261,"column":32}}},"9":{"name":"(anonymous_9)","line":271,"loc":{"start":{"line":271,"column":23},"end":{"line":271,"column":34}}},"10":{"name":"(anonymous_10)","line":282,"loc":{"start":{"line":282,"column":15},"end":{"line":282,"column":27}}},"11":{"name":"(anonymous_11)","line":296,"loc":{"start":{"line":296,"column":22},"end":{"line":296,"column":33}}},"12":{"name":"(anonymous_12)","line":307,"loc":{"start":{"line":307,"column":15},"end":{"line":307,"column":26}}},"13":{"name":"(anonymous_13)","line":314,"loc":{"start":{"line":314,"column":13},"end":{"line":314,"column":24}}},"14":{"name":"(anonymous_14)","line":330,"loc":{"start":{"line":330,"column":9},"end":{"line":330,"column":20}}},"15":{"name":"(anonymous_15)","line":341,"loc":{"start":{"line":341,"column":20},"end":{"line":341,"column":37}}},"16":{"name":"(anonymous_16)","line":351,"loc":{"start":{"line":351,"column":21},"end":{"line":351,"column":32}}},"17":{"name":"(anonymous_17)","line":375,"loc":{"start":{"line":375,"column":9},"end":{"line":375,"column":20}}},"18":{"name":"(anonymous_18)","line":387,"loc":{"start":{"line":387,"column":20},"end":{"line":387,"column":35}}},"19":{"name":"(anonymous_19)","line":402,"loc":{"start":{"line":402,"column":21},"end":{"line":402,"column":32}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":423,"column":40}},"2":{"start":{"line":19,"column":4},"end":{"line":31,"column":35}},"3":{"start":{"line":20,"column":8},"end":{"line":20,"column":56}},"4":{"start":{"line":34,"column":4},"end":{"line":103,"column":6}},"5":{"start":{"line":44,"column":16},"end":{"line":46,"column":17}},"6":{"start":{"line":45,"column":20},"end":{"line":45,"column":32}},"7":{"start":{"line":47,"column":16},"end":{"line":47,"column":29}},"8":{"start":{"line":105,"column":4},"end":{"line":318,"column":7}},"9":{"start":{"line":140,"column":12},"end":{"line":148,"column":52}},"10":{"start":{"line":150,"column":12},"end":{"line":155,"column":14}},"11":{"start":{"line":156,"column":12},"end":{"line":156,"column":36}},"12":{"start":{"line":157,"column":12},"end":{"line":157,"column":21}},"13":{"start":{"line":160,"column":12},"end":{"line":160,"column":35}},"14":{"start":{"line":161,"column":12},"end":{"line":161,"column":60}},"15":{"start":{"line":162,"column":12},"end":{"line":162,"column":56}},"16":{"start":{"line":163,"column":12},"end":{"line":163,"column":57}},"17":{"start":{"line":166,"column":12},"end":{"line":168,"column":22}},"18":{"start":{"line":167,"column":16},"end":{"line":167,"column":43}},"19":{"start":{"line":177,"column":12},"end":{"line":195,"column":27}},"20":{"start":{"line":197,"column":12},"end":{"line":208,"column":13}},"21":{"start":{"line":198,"column":16},"end":{"line":202,"column":17}},"22":{"start":{"line":199,"column":20},"end":{"line":199,"column":34}},"23":{"start":{"line":200,"column":20},"end":{"line":200,"column":48}},"24":{"start":{"line":201,"column":20},"end":{"line":201,"column":35}},"25":{"start":{"line":203,"column":16},"end":{"line":207,"column":17}},"26":{"start":{"line":204,"column":20},"end":{"line":204,"column":34}},"27":{"start":{"line":205,"column":20},"end":{"line":205,"column":48}},"28":{"start":{"line":206,"column":20},"end":{"line":206,"column":35}},"29":{"start":{"line":209,"column":12},"end":{"line":221,"column":13}},"30":{"start":{"line":210,"column":16},"end":{"line":215,"column":17}},"31":{"start":{"line":211,"column":20},"end":{"line":211,"column":34}},"32":{"start":{"line":212,"column":20},"end":{"line":212,"column":48}},"33":{"start":{"line":213,"column":20},"end":{"line":213,"column":34}},"34":{"start":{"line":216,"column":16},"end":{"line":220,"column":17}},"35":{"start":{"line":217,"column":20},"end":{"line":217,"column":34}},"36":{"start":{"line":218,"column":20},"end":{"line":218,"column":48}},"37":{"start":{"line":219,"column":20},"end":{"line":219,"column":34}},"38":{"start":{"line":223,"column":12},"end":{"line":226,"column":13}},"39":{"start":{"line":224,"column":16},"end":{"line":224,"column":23}},"40":{"start":{"line":225,"column":16},"end":{"line":225,"column":27}},"41":{"start":{"line":228,"column":12},"end":{"line":231,"column":13}},"42":{"start":{"line":229,"column":16},"end":{"line":229,"column":23}},"43":{"start":{"line":230,"column":16},"end":{"line":230,"column":27}},"44":{"start":{"line":233,"column":12},"end":{"line":235,"column":13}},"45":{"start":{"line":234,"column":16},"end":{"line":234,"column":27}},"46":{"start":{"line":236,"column":12},"end":{"line":238,"column":13}},"47":{"start":{"line":237,"column":16},"end":{"line":237,"column":27}},"48":{"start":{"line":239,"column":12},"end":{"line":254,"column":13}},"49":{"start":{"line":240,"column":16},"end":{"line":240,"column":36}},"50":{"start":{"line":241,"column":16},"end":{"line":241,"column":46}},"51":{"start":{"line":242,"column":16},"end":{"line":242,"column":30}},"52":{"start":{"line":243,"column":16},"end":{"line":243,"column":36}},"53":{"start":{"line":244,"column":16},"end":{"line":244,"column":62}},"54":{"start":{"line":245,"column":16},"end":{"line":247,"column":17}},"55":{"start":{"line":246,"column":20},"end":{"line":246,"column":41}},"56":{"start":{"line":249,"column":16},"end":{"line":253,"column":17}},"57":{"start":{"line":250,"column":20},"end":{"line":250,"column":39}},"58":{"start":{"line":252,"column":20},"end":{"line":252,"column":41}},"59":{"start":{"line":262,"column":12},"end":{"line":262,"column":33}},"60":{"start":{"line":263,"column":12},"end":{"line":263,"column":112}},"61":{"start":{"line":272,"column":12},"end":{"line":272,"column":36}},"62":{"start":{"line":273,"column":12},"end":{"line":276,"column":13}},"63":{"start":{"line":274,"column":16},"end":{"line":274,"column":43}},"64":{"start":{"line":275,"column":16},"end":{"line":275,"column":41}},"65":{"start":{"line":283,"column":12},"end":{"line":286,"column":13}},"66":{"start":{"line":284,"column":16},"end":{"line":284,"column":37}},"67":{"start":{"line":285,"column":16},"end":{"line":285,"column":35}},"68":{"start":{"line":287,"column":12},"end":{"line":289,"column":13}},"69":{"start":{"line":288,"column":16},"end":{"line":288,"column":39}},"70":{"start":{"line":297,"column":12},"end":{"line":297,"column":54}},"71":{"start":{"line":298,"column":12},"end":{"line":301,"column":14}},"72":{"start":{"line":308,"column":12},"end":{"line":308,"column":32}},"73":{"start":{"line":315,"column":12},"end":{"line":315,"column":34}},"74":{"start":{"line":316,"column":12},"end":{"line":316,"column":33}},"75":{"start":{"line":320,"column":4},"end":{"line":320,"column":26}},"76":{"start":{"line":330,"column":4},"end":{"line":332,"column":6}},"77":{"start":{"line":331,"column":8},"end":{"line":331,"column":57}},"78":{"start":{"line":333,"column":4},"end":{"line":348,"column":7}},"79":{"start":{"line":342,"column":16},"end":{"line":344,"column":17}},"80":{"start":{"line":343,"column":20},"end":{"line":343,"column":58}},"81":{"start":{"line":345,"column":16},"end":{"line":345,"column":30}},"82":{"start":{"line":349,"column":4},"end":{"line":354,"column":7}},"83":{"start":{"line":352,"column":12},"end":{"line":352,"column":63}},"84":{"start":{"line":364,"column":4},"end":{"line":364,"column":34}},"85":{"start":{"line":365,"column":4},"end":{"line":365,"column":30}},"86":{"start":{"line":375,"column":4},"end":{"line":378,"column":6}},"87":{"start":{"line":376,"column":8},"end":{"line":376,"column":57}},"88":{"start":{"line":379,"column":4},"end":{"line":399,"column":7}},"89":{"start":{"line":388,"column":16},"end":{"line":388,"column":36}},"90":{"start":{"line":389,"column":16},"end":{"line":395,"column":17}},"91":{"start":{"line":390,"column":20},"end":{"line":392,"column":21}},"92":{"start":{"line":391,"column":24},"end":{"line":391,"column":77}},"93":{"start":{"line":394,"column":20},"end":{"line":394,"column":47}},"94":{"start":{"line":396,"column":16},"end":{"line":396,"column":25}},"95":{"start":{"line":400,"column":4},"end":{"line":405,"column":7}},"96":{"start":{"line":403,"column":12},"end":{"line":403,"column":47}},"97":{"start":{"line":415,"column":4},"end":{"line":415,"column":35}},"98":{"start":{"line":416,"column":4},"end":{"line":416,"column":31}},"99":{"start":{"line":418,"column":4},"end":{"line":418,"column":20}}},"branchMap":{"1":{"line":44,"type":"if","locations":[{"start":{"line":44,"column":16},"end":{"line":44,"column":16}},{"start":{"line":44,"column":16},"end":{"line":44,"column":16}}]},"2":{"line":144,"type":"cond-expr","locations":[{"start":{"line":144,"column":25},"end":{"line":144,"column":27}},{"start":{"line":144,"column":30},"end":{"line":144,"column":39}}]},"3":{"line":145,"type":"cond-expr","locations":[{"start":{"line":145,"column":24},"end":{"line":145,"column":34}},{"start":{"line":145,"column":37},"end":{"line":145,"column":49}}]},"4":{"line":146,"type":"cond-expr","locations":[{"start":{"line":146,"column":24},"end":{"line":146,"column":35}},{"start":{"line":146,"column":38},"end":{"line":146,"column":51}}]},"5":{"line":147,"type":"cond-expr","locations":[{"start":{"line":147,"column":24},"end":{"line":147,"column":41}},{"start":{"line":147,"column":44},"end":{"line":147,"column":49}}]},"6":{"line":148,"type":"cond-expr","locations":[{"start":{"line":148,"column":24},"end":{"line":148,"column":42}},{"start":{"line":148,"column":45},"end":{"line":148,"column":50}}]},"7":{"line":197,"type":"if","locations":[{"start":{"line":197,"column":12},"end":{"line":197,"column":12}},{"start":{"line":197,"column":12},"end":{"line":197,"column":12}}]},"8":{"line":198,"type":"if","locations":[{"start":{"line":198,"column":16},"end":{"line":198,"column":16}},{"start":{"line":198,"column":16},"end":{"line":198,"column":16}}]},"9":{"line":200,"type":"cond-expr","locations":[{"start":{"line":200,"column":41},"end":{"line":200,"column":42}},{"start":{"line":200,"column":45},"end":{"line":200,"column":46}}]},"10":{"line":203,"type":"if","locations":[{"start":{"line":203,"column":16},"end":{"line":203,"column":16}},{"start":{"line":203,"column":16},"end":{"line":203,"column":16}}]},"11":{"line":205,"type":"cond-expr","locations":[{"start":{"line":205,"column":41},"end":{"line":205,"column":42}},{"start":{"line":205,"column":45},"end":{"line":205,"column":46}}]},"12":{"line":209,"type":"if","locations":[{"start":{"line":209,"column":12},"end":{"line":209,"column":12}},{"start":{"line":209,"column":12},"end":{"line":209,"column":12}}]},"13":{"line":210,"type":"if","locations":[{"start":{"line":210,"column":16},"end":{"line":210,"column":16}},{"start":{"line":210,"column":16},"end":{"line":210,"column":16}}]},"14":{"line":212,"type":"cond-expr","locations":[{"start":{"line":212,"column":41},"end":{"line":212,"column":42}},{"start":{"line":212,"column":45},"end":{"line":212,"column":46}}]},"15":{"line":216,"type":"if","locations":[{"start":{"line":216,"column":16},"end":{"line":216,"column":16}},{"start":{"line":216,"column":16},"end":{"line":216,"column":16}}]},"16":{"line":218,"type":"cond-expr","locations":[{"start":{"line":218,"column":41},"end":{"line":218,"column":42}},{"start":{"line":218,"column":45},"end":{"line":218,"column":46}}]},"17":{"line":223,"type":"if","locations":[{"start":{"line":223,"column":12},"end":{"line":223,"column":12}},{"start":{"line":223,"column":12},"end":{"line":223,"column":12}}]},"18":{"line":228,"type":"if","locations":[{"start":{"line":228,"column":12},"end":{"line":228,"column":12}},{"start":{"line":228,"column":12},"end":{"line":228,"column":12}}]},"19":{"line":233,"type":"if","locations":[{"start":{"line":233,"column":12},"end":{"line":233,"column":12}},{"start":{"line":233,"column":12},"end":{"line":233,"column":12}}]},"20":{"line":236,"type":"if","locations":[{"start":{"line":236,"column":12},"end":{"line":236,"column":12}},{"start":{"line":236,"column":12},"end":{"line":236,"column":12}}]},"21":{"line":239,"type":"if","locations":[{"start":{"line":239,"column":12},"end":{"line":239,"column":12}},{"start":{"line":239,"column":12},"end":{"line":239,"column":12}}]},"22":{"line":245,"type":"if","locations":[{"start":{"line":245,"column":16},"end":{"line":245,"column":16}},{"start":{"line":245,"column":16},"end":{"line":245,"column":16}}]},"23":{"line":245,"type":"binary-expr","locations":[{"start":{"line":245,"column":20},"end":{"line":245,"column":23}},{"start":{"line":245,"column":27},"end":{"line":245,"column":30}}]},"24":{"line":249,"type":"if","locations":[{"start":{"line":249,"column":16},"end":{"line":249,"column":16}},{"start":{"line":249,"column":16},"end":{"line":249,"column":16}}]},"25":{"line":273,"type":"if","locations":[{"start":{"line":273,"column":12},"end":{"line":273,"column":12}},{"start":{"line":273,"column":12},"end":{"line":273,"column":12}}]},"26":{"line":283,"type":"if","locations":[{"start":{"line":283,"column":12},"end":{"line":283,"column":12}},{"start":{"line":283,"column":12},"end":{"line":283,"column":12}}]},"27":{"line":287,"type":"if","locations":[{"start":{"line":287,"column":12},"end":{"line":287,"column":12}},{"start":{"line":287,"column":12},"end":{"line":287,"column":12}}]},"28":{"line":342,"type":"if","locations":[{"start":{"line":342,"column":16},"end":{"line":342,"column":16}},{"start":{"line":342,"column":16},"end":{"line":342,"column":16}}]},"29":{"line":389,"type":"if","locations":[{"start":{"line":389,"column":16},"end":{"line":389,"column":16}},{"start":{"line":389,"column":16},"end":{"line":389,"column":16}}]},"30":{"line":390,"type":"if","locations":[{"start":{"line":390,"column":20},"end":{"line":390,"column":20}},{"start":{"line":390,"column":20},"end":{"line":390,"column":20}}]}},"code":["(function () { YUI.add('dd-scroll', function (Y, NAME) {","","","    /**","     * Base scroller class used to create the Plugin.DDNodeScroll and Plugin.DDWinScroll.","     * This class should not be called on it's own, it's designed to be a plugin.","     * @module dd","     * @submodule dd-scroll","     */","    /**","     * Base scroller class used to create the Plugin.DDNodeScroll and Plugin.DDWinScroll.","     * This class should not be called on it's own, it's designed to be a plugin.","     * @class Scroll","     * @extends Base","     * @namespace DD","     * @constructor","     */","","    var S = function() {","        S.superclass.constructor.apply(this, arguments);","","    },","    WS, NS,","    HOST = 'host',","    BUFFER = 'buffer',","    PARENT_SCROLL = 'parentScroll',","    WINDOW_SCROLL = 'windowScroll',","    SCROLL_TOP = 'scrollTop',","    SCROLL_LEFT = 'scrollLeft',","    OFFSET_WIDTH = 'offsetWidth',","    OFFSET_HEIGHT = 'offsetHeight';","","","    S.ATTRS = {","        /**","        * Internal config option to hold the node that we are scrolling. Should not be set by the developer.","        * @attribute parentScroll","        * @protected","        * @type Node","        */","        parentScroll: {","            value: false,","            setter: function(node) {","                if (node) {","                    return node;","                }","                return false;","            }","        },","        /**","        * The number of pixels from the edge of the screen to turn on scrolling. Default: 30","        * @attribute buffer","        * @type Number","        */","        buffer: {","            value: 30,","            validator: Y.Lang.isNumber","        },","        /**","        * The number of milliseconds delay to pass to the auto scroller. Default: 235","        * @attribute scrollDelay","        * @type Number","        */","        scrollDelay: {","            value: 235,","            validator: Y.Lang.isNumber","        },","        /**","        * The host we are plugged into.","        * @attribute host","        * @type Object","        */","        host: {","            value: null","        },","        /**","        * Turn on window scroll support, default: false","        * @attribute windowScroll","        * @type Boolean","        */","        windowScroll: {","            value: false,","            validator: Y.Lang.isBoolean","        },","        /**","        * Allow vertical scrolling, default: true.","        * @attribute vertical","        * @type Boolean","        */","        vertical: {","            value: true,","            validator: Y.Lang.isBoolean","        },","        /**","        * Allow horizontal scrolling, default: true.","        * @attribute horizontal","        * @type Boolean","        */","        horizontal: {","            value: true,","            validator: Y.Lang.isBoolean","        }","    };","","    Y.extend(S, Y.Base, {","        /**","        * Tells if we are actively scrolling or not.","        * @private","        * @property _scrolling","        * @type Boolean","        */","        _scrolling: null,","        /**","        * Cache of the Viewport dims.","        * @private","        * @property _vpRegionCache","        * @type Object","        */","        _vpRegionCache: null,","        /**","        * Cache of the dragNode dims.","        * @private","        * @property _dimCache","        * @type Object","        */","        _dimCache: null,","        /**","        * Holder for the Timer object returned from Y.later.","        * @private","        * @property _scrollTimer","        * @type {Y.later}","        */","        _scrollTimer: null,","        /**","        * Sets the _vpRegionCache property with an Object containing the dims from the viewport.","        * @private","        * @method _getVPRegion","        */","        _getVPRegion: function() {","            var r = {},","                n = this.get(PARENT_SCROLL),","            b = this.get(BUFFER),","            ws = this.get(WINDOW_SCROLL),","            xy = ((ws) ? [] : n.getXY()),","            w = ((ws) ? 'winWidth' : OFFSET_WIDTH),","            h = ((ws) ? 'winHeight' : OFFSET_HEIGHT),","            t = ((ws) ? n.get(SCROLL_TOP) : xy[1]),","            l = ((ws) ? n.get(SCROLL_LEFT) : xy[0]);","","            r = {","                top: t + b,","                right: (n.get(w) + l) - b,","                bottom: (n.get(h) + t) - b,","                left: l + b","            };","            this._vpRegionCache = r;","            return r;","        },","        initializer: function() {","            var h = this.get(HOST);","            h.after('drag:start', Y.bind(this.start, this));","            h.after('drag:end', Y.bind(this.end, this));","            h.on('drag:align', Y.bind(this.align, this));","","            //TODO - This doesn't work yet??","            Y.one('win').on('scroll', Y.bind(function() {","                this._vpRegionCache = null;","            }, this));","        },","        /**","        * Check to see if we need to fire the scroll timer. If scroll timer is running this will scroll the window.","        * @private","        * @method _checkWinScroll","        * @param {Boolean} move Should we move the window. From Y.later","        */","        _checkWinScroll: function(move) {","            var r = this._getVPRegion(),","                ho = this.get(HOST),","                ws = this.get(WINDOW_SCROLL),","                xy = ho.lastXY,","                scroll = false,","                b = this.get(BUFFER),","                win = this.get(PARENT_SCROLL),","                sTop = win.get(SCROLL_TOP),","                sLeft = win.get(SCROLL_LEFT),","                w = this._dimCache.w,","                h = this._dimCache.h,","                bottom = xy[1] + h,","                top = xy[1],","                right = xy[0] + w,","                left = xy[0],","                nt = top,","                nl = left,","                st = sTop,","                sl = sLeft;","","            if (this.get('horizontal')) {","                if (left <= r.left) {","                    scroll = true;","                    nl = xy[0] - ((ws) ? b : 0);","                    sl = sLeft - b;","                }","                if (right >= r.right) {","                    scroll = true;","                    nl = xy[0] + ((ws) ? b : 0);","                    sl = sLeft + b;","                }","            }","            if (this.get('vertical')) {","                if (bottom >= r.bottom) {","                    scroll = true;","                    nt = xy[1] + ((ws) ? b : 0);","                    st = sTop + b;","","                }","                if (top <= r.top) {","                    scroll = true;","                    nt = xy[1] - ((ws) ? b : 0);","                    st = sTop - b;","                }","            }","","            if (st < 0) {","                st = 0;","                nt = xy[1];","            }","","            if (sl < 0) {","                sl = 0;","                nl = xy[0];","            }","","            if (nt < 0) {","                nt = xy[1];","            }","            if (nl < 0) {","                nl = xy[0];","            }","            if (move) {","                ho.actXY = [nl, nt];","                ho._alignNode([nl, nt], true); //We are srolling..","                xy = ho.actXY;","                ho.actXY = [nl, nt];","                ho._moveNode({ node: win, top: st, left: sl});","                if (!st && !sl) {","                    this._cancelScroll();","                }","            } else {","                if (scroll) {","                    this._initScroll();","                } else {","                    this._cancelScroll();","                }","            }","        },","        /**","        * Cancel a previous scroll timer and init a new one.","        * @private","        * @method _initScroll","        */","        _initScroll: function() {","            this._cancelScroll();","            this._scrollTimer = Y.Lang.later(this.get('scrollDelay'), this, this._checkWinScroll, [true], true);","","        },","        /**","        * Cancel a currently running scroll timer.","        * @private","        * @method _cancelScroll","        */","        _cancelScroll: function() {","            this._scrolling = false;","            if (this._scrollTimer) {","                this._scrollTimer.cancel();","                delete this._scrollTimer;","            }","        },","        /**","        * Called from the drag:align event to determine if we need to scroll.","        * @method align","        */","        align: function(e) {","            if (this._scrolling) {","                this._cancelScroll();","                e.preventDefault();","            }","            if (!this._scrolling) {","                this._checkWinScroll();","            }","        },","        /**","        * Set the cache of the dragNode dims.","        * @private","        * @method _setDimCache","        */","        _setDimCache: function() {","            var node = this.get(HOST).get('dragNode');","            this._dimCache = {","                h: node.get(OFFSET_HEIGHT),","                w: node.get(OFFSET_WIDTH)","            };","        },","        /**","        * Called from the drag:start event","        * @method start","        */","        start: function() {","            this._setDimCache();","        },","        /**","        * Called from the drag:end event","        * @method end","        */","        end: function() {","            this._dimCache = null;","            this._cancelScroll();","        }","    });","","    Y.namespace('Plugin');","","","    /**","     * Extends the Scroll class to make the window scroll while dragging.","     * @class DDWindowScroll","     * @extends Scroll","     * @namespace Plugin","     * @constructor","     */","    WS = function() {","        WS.superclass.constructor.apply(this, arguments);","    };","    WS.ATTRS = Y.merge(S.ATTRS, {","        /**","        * Turn on window scroll support, default: true","        * @attribute windowScroll","        * @type Boolean","        */","        windowScroll: {","            value: true,","            setter: function(scroll) {","                if (scroll) {","                    this.set(PARENT_SCROLL, Y.one('win'));","                }","                return scroll;","            }","        }","    });","    Y.extend(WS, S, {","        //Shouldn't have to do this..","        initializer: function() {","            this.set('windowScroll', this.get('windowScroll'));","        }","    });","    /**","    * The Scroll instance will be placed on the Drag instance under the winscroll namespace.","    * @property NS","    * @default winscroll","    * @readonly","    * @protected","    * @static","    * @type {String}","    */","    WS.NAME = WS.NS = 'winscroll';","    Y.Plugin.DDWinScroll = WS;","","","    /**","     * Extends the Scroll class to make a parent node scroll while dragging.","     * @class DDNodeScroll","     * @extends Scroll","     * @namespace Plugin","     * @constructor","     */","    NS = function() {","        NS.superclass.constructor.apply(this, arguments);","","    };","    NS.ATTRS = Y.merge(S.ATTRS, {","        /**","        * The node we want to scroll. Used to set the internal parentScroll attribute.","        * @attribute node","        * @type Node","        */","        node: {","            value: false,","            setter: function(node) {","                var n = Y.one(node);","                if (!n) {","                    if (node !== false) {","                        Y.error('DDNodeScroll: Invalid Node Given: ' + node);","                    }","                } else {","                    this.set(PARENT_SCROLL, n);","                }","                return n;","            }","        }","    });","    Y.extend(NS, S, {","        //Shouldn't have to do this..","        initializer: function() {","            this.set('node', this.get('node'));","        }","    });","    /**","    * The NodeScroll instance will be placed on the Drag instance under the nodescroll namespace.","    * @property NS","    * @default nodescroll","    * @readonly","    * @protected","    * @static","    * @type {String}","    */","    NS.NAME = NS.NS = 'nodescroll';","    Y.Plugin.DDNodeScroll = NS;","","    Y.DD.Scroll = S;","","","","","}, '3.13.0', {\"requires\": [\"dd-drag\"]});","","}());"]};
 
11
}
 
12
var __cov_BZX4sZRTJcQW$pg46zZygw = __coverage__['build/dd-scroll/dd-scroll.js'];
 
13
__cov_BZX4sZRTJcQW$pg46zZygw.s['1']++;YUI.add('dd-scroll',function(Y,NAME){__cov_BZX4sZRTJcQW$pg46zZygw.f['1']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['2']++;var S=function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['2']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['3']++;S.superclass.constructor.apply(this,arguments);},WS,NS,HOST='host',BUFFER='buffer',PARENT_SCROLL='parentScroll',WINDOW_SCROLL='windowScroll',SCROLL_TOP='scrollTop',SCROLL_LEFT='scrollLeft',OFFSET_WIDTH='offsetWidth',OFFSET_HEIGHT='offsetHeight';__cov_BZX4sZRTJcQW$pg46zZygw.s['4']++;S.ATTRS={parentScroll:{value:false,setter:function(node){__cov_BZX4sZRTJcQW$pg46zZygw.f['3']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['5']++;if(node){__cov_BZX4sZRTJcQW$pg46zZygw.b['1'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['6']++;return node;}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['1'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['7']++;return false;}},buffer:{value:30,validator:Y.Lang.isNumber},scrollDelay:{value:235,validator:Y.Lang.isNumber},host:{value:null},windowScroll:{value:false,validator:Y.Lang.isBoolean},vertical:{value:true,validator:Y.Lang.isBoolean},horizontal:{value:true,validator:Y.Lang.isBoolean}};__cov_BZX4sZRTJcQW$pg46zZygw.s['8']++;Y.extend(S,Y.Base,{_scrolling:null,_vpRegionCache:null,_dimCache:null,_scrollTimer:null,_getVPRegion:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['4']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['9']++;var r={},n=this.get(PARENT_SCROLL),b=this.get(BUFFER),ws=this.get(WINDOW_SCROLL),xy=ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['2'][0]++,[]):(__cov_BZX4sZRTJcQW$pg46zZygw.b['2'][1]++,n.getXY()),w=ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['3'][0]++,'winWidth'):(__cov_BZX4sZRTJcQW$pg46zZygw.b['3'][1]++,OFFSET_WIDTH),h=ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['4'][0]++,'winHeight'):(__cov_BZX4sZRTJcQW$pg46zZygw.b['4'][1]++,OFFSET_HEIGHT),t=ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['5'][0]++,n.get(SCROLL_TOP)):(__cov_BZX4sZRTJcQW$pg46zZygw.b['5'][1]++,xy[1]),l=ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['6'][0]++,n.get(SCROLL_LEFT)):(__cov_BZX4sZRTJcQW$pg46zZygw.b['6'][1]++,xy[0]);__cov_BZX4sZRTJcQW$pg46zZygw.s['10']++;r={top:t+b,right:n.get(w)+l-b,bottom:n.get(h)+t-b,left:l+b};__cov_BZX4sZRTJcQW$pg46zZygw.s['11']++;this._vpRegionCache=r;__cov_BZX4sZRTJcQW$pg46zZygw.s['12']++;return r;},initializer:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['5']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['13']++;var h=this.get(HOST);__cov_BZX4sZRTJcQW$pg46zZygw.s['14']++;h.after('drag:start',Y.bind(this.start,this));__cov_BZX4sZRTJcQW$pg46zZygw.s['15']++;h.after('drag:end',Y.bind(this.end,this));__cov_BZX4sZRTJcQW$pg46zZygw.s['16']++;h.on('drag:align',Y.bind(this.align,this));__cov_BZX4sZRTJcQW$pg46zZygw.s['17']++;Y.one('win').on('scroll',Y.bind(function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['6']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['18']++;this._vpRegionCache=null;},this));},_checkWinScroll:function(move){__cov_BZX4sZRTJcQW$pg46zZygw.f['7']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['19']++;var r=this._getVPRegion(),ho=this.get(HOST),ws=this.get(WINDOW_SCROLL),xy=ho.lastXY,scroll=false,b=this.get(BUFFER),win=this.get(PARENT_SCROLL),sTop=win.get(SCROLL_TOP),sLeft=win.get(SCROLL_LEFT),w=this._dimCache.w,h=this._dimCache.h,bottom=xy[1]+h,top=xy[1],right=xy[0]+w,left=xy[0],nt=top,nl=left,st=sTop,sl=sLeft;__cov_BZX4sZRTJcQW$pg46zZygw.s['20']++;if(this.get('horizontal')){__cov_BZX4sZRTJcQW$pg46zZygw.b['7'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['21']++;if(left<=r.left){__cov_BZX4sZRTJcQW$pg46zZygw.b['8'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['22']++;scroll=true;__cov_BZX4sZRTJcQW$pg46zZygw.s['23']++;nl=xy[0]-(ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['9'][0]++,b):(__cov_BZX4sZRTJcQW$pg46zZygw.b['9'][1]++,0));__cov_BZX4sZRTJcQW$pg46zZygw.s['24']++;sl=sLeft-b;}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['8'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['25']++;if(right>=r.right){__cov_BZX4sZRTJcQW$pg46zZygw.b['10'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['26']++;scroll=true;__cov_BZX4sZRTJcQW$pg46zZygw.s['27']++;nl=xy[0]+(ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['11'][0]++,b):(__cov_BZX4sZRTJcQW$pg46zZygw.b['11'][1]++,0));__cov_BZX4sZRTJcQW$pg46zZygw.s['28']++;sl=sLeft+b;}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['10'][1]++;}}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['7'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['29']++;if(this.get('vertical')){__cov_BZX4sZRTJcQW$pg46zZygw.b['12'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['30']++;if(bottom>=r.bottom){__cov_BZX4sZRTJcQW$pg46zZygw.b['13'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['31']++;scroll=true;__cov_BZX4sZRTJcQW$pg46zZygw.s['32']++;nt=xy[1]+(ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['14'][0]++,b):(__cov_BZX4sZRTJcQW$pg46zZygw.b['14'][1]++,0));__cov_BZX4sZRTJcQW$pg46zZygw.s['33']++;st=sTop+b;}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['13'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['34']++;if(top<=r.top){__cov_BZX4sZRTJcQW$pg46zZygw.b['15'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['35']++;scroll=true;__cov_BZX4sZRTJcQW$pg46zZygw.s['36']++;nt=xy[1]-(ws?(__cov_BZX4sZRTJcQW$pg46zZygw.b['16'][0]++,b):(__cov_BZX4sZRTJcQW$pg46zZygw.b['16'][1]++,0));__cov_BZX4sZRTJcQW$pg46zZygw.s['37']++;st=sTop-b;}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['15'][1]++;}}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['12'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['38']++;if(st<0){__cov_BZX4sZRTJcQW$pg46zZygw.b['17'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['39']++;st=0;__cov_BZX4sZRTJcQW$pg46zZygw.s['40']++;nt=xy[1];}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['17'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['41']++;if(sl<0){__cov_BZX4sZRTJcQW$pg46zZygw.b['18'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['42']++;sl=0;__cov_BZX4sZRTJcQW$pg46zZygw.s['43']++;nl=xy[0];}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['18'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['44']++;if(nt<0){__cov_BZX4sZRTJcQW$pg46zZygw.b['19'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['45']++;nt=xy[1];}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['19'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['46']++;if(nl<0){__cov_BZX4sZRTJcQW$pg46zZygw.b['20'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['47']++;nl=xy[0];}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['20'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['48']++;if(move){__cov_BZX4sZRTJcQW$pg46zZygw.b['21'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['49']++;ho.actXY=[nl,nt];__cov_BZX4sZRTJcQW$pg46zZygw.s['50']++;ho._alignNode([nl,nt],true);__cov_BZX4sZRTJcQW$pg46zZygw.s['51']++;xy=ho.actXY;__cov_BZX4sZRTJcQW$pg46zZygw.s['52']++;ho.actXY=[nl,nt];__cov_BZX4sZRTJcQW$pg46zZygw.s['53']++;ho._moveNode({node:win,top:st,left:sl});__cov_BZX4sZRTJcQW$pg46zZygw.s['54']++;if((__cov_BZX4sZRTJcQW$pg46zZygw.b['23'][0]++,!st)&&(__cov_BZX4sZRTJcQW$pg46zZygw.b['23'][1]++,!sl)){__cov_BZX4sZRTJcQW$pg46zZygw.b['22'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['55']++;this._cancelScroll();}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['22'][1]++;}}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['21'][1]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['56']++;if(scroll){__cov_BZX4sZRTJcQW$pg46zZygw.b['24'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['57']++;this._initScroll();}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['24'][1]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['58']++;this._cancelScroll();}}},_initScroll:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['8']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['59']++;this._cancelScroll();__cov_BZX4sZRTJcQW$pg46zZygw.s['60']++;this._scrollTimer=Y.Lang.later(this.get('scrollDelay'),this,this._checkWinScroll,[true],true);},_cancelScroll:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['9']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['61']++;this._scrolling=false;__cov_BZX4sZRTJcQW$pg46zZygw.s['62']++;if(this._scrollTimer){__cov_BZX4sZRTJcQW$pg46zZygw.b['25'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['63']++;this._scrollTimer.cancel();__cov_BZX4sZRTJcQW$pg46zZygw.s['64']++;delete this._scrollTimer;}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['25'][1]++;}},align:function(e){__cov_BZX4sZRTJcQW$pg46zZygw.f['10']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['65']++;if(this._scrolling){__cov_BZX4sZRTJcQW$pg46zZygw.b['26'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['66']++;this._cancelScroll();__cov_BZX4sZRTJcQW$pg46zZygw.s['67']++;e.preventDefault();}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['26'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['68']++;if(!this._scrolling){__cov_BZX4sZRTJcQW$pg46zZygw.b['27'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['69']++;this._checkWinScroll();}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['27'][1]++;}},_setDimCache:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['11']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['70']++;var node=this.get(HOST).get('dragNode');__cov_BZX4sZRTJcQW$pg46zZygw.s['71']++;this._dimCache={h:node.get(OFFSET_HEIGHT),w:node.get(OFFSET_WIDTH)};},start:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['12']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['72']++;this._setDimCache();},end:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['13']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['73']++;this._dimCache=null;__cov_BZX4sZRTJcQW$pg46zZygw.s['74']++;this._cancelScroll();}});__cov_BZX4sZRTJcQW$pg46zZygw.s['75']++;Y.namespace('Plugin');__cov_BZX4sZRTJcQW$pg46zZygw.s['76']++;WS=function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['14']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['77']++;WS.superclass.constructor.apply(this,arguments);};__cov_BZX4sZRTJcQW$pg46zZygw.s['78']++;WS.ATTRS=Y.merge(S.ATTRS,{windowScroll:{value:true,setter:function(scroll){__cov_BZX4sZRTJcQW$pg46zZygw.f['15']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['79']++;if(scroll){__cov_BZX4sZRTJcQW$pg46zZygw.b['28'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['80']++;this.set(PARENT_SCROLL,Y.one('win'));}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['28'][1]++;}__cov_BZX4sZRTJcQW$pg46zZygw.s['81']++;return scroll;}}});__cov_BZX4sZRTJcQW$pg46zZygw.s['82']++;Y.extend(WS,S,{initializer:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['16']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['83']++;this.set('windowScroll',this.get('windowScroll'));}});__cov_BZX4sZRTJcQW$pg46zZygw.s['84']++;WS.NAME=WS.NS='winscroll';__cov_BZX4sZRTJcQW$pg46zZygw.s['85']++;Y.Plugin.DDWinScroll=WS;__cov_BZX4sZRTJcQW$pg46zZygw.s['86']++;NS=function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['17']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['87']++;NS.superclass.constructor.apply(this,arguments);};__cov_BZX4sZRTJcQW$pg46zZygw.s['88']++;NS.ATTRS=Y.merge(S.ATTRS,{node:{value:false,setter:function(node){__cov_BZX4sZRTJcQW$pg46zZygw.f['18']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['89']++;var n=Y.one(node);__cov_BZX4sZRTJcQW$pg46zZygw.s['90']++;if(!n){__cov_BZX4sZRTJcQW$pg46zZygw.b['29'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['91']++;if(node!==false){__cov_BZX4sZRTJcQW$pg46zZygw.b['30'][0]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['92']++;Y.error('DDNodeScroll: Invalid Node Given: '+node);}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['30'][1]++;}}else{__cov_BZX4sZRTJcQW$pg46zZygw.b['29'][1]++;__cov_BZX4sZRTJcQW$pg46zZygw.s['93']++;this.set(PARENT_SCROLL,n);}__cov_BZX4sZRTJcQW$pg46zZygw.s['94']++;return n;}}});__cov_BZX4sZRTJcQW$pg46zZygw.s['95']++;Y.extend(NS,S,{initializer:function(){__cov_BZX4sZRTJcQW$pg46zZygw.f['19']++;__cov_BZX4sZRTJcQW$pg46zZygw.s['96']++;this.set('node',this.get('node'));}});__cov_BZX4sZRTJcQW$pg46zZygw.s['97']++;NS.NAME=NS.NS='nodescroll';__cov_BZX4sZRTJcQW$pg46zZygw.s['98']++;Y.Plugin.DDNodeScroll=NS;__cov_BZX4sZRTJcQW$pg46zZygw.s['99']++;Y.DD.Scroll=S;},'3.13.0',{'requires':['dd-drag']});