a:19:{s:9:"#provides";s:19:"dojo.dnd.autoscroll";s:9:"#resource";s:17:"dnd/autoscroll.js";s:20:"dojo.dnd._validNodes";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:24:"dojo.dnd._validNodes.div";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:22:"dojo.dnd._validNodes.p";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:23:"dojo.dnd._validNodes.td";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:23:"dojo.dnd._validOverflow";a:3:{s:4:"type";s:6:"Object";s:7:"private";b:1;s:7:"summary";s:0:"";}s:28:"dojo.dnd._validOverflow.auto";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:30:"dojo.dnd._validOverflow.scroll";a:2:{s:14:"private_parent";b:1;s:7:"summary";s:0:"";}s:20:"dojo.dnd.getViewport";a:4:{s:4:"type";s:8:"Function";s:6:"source";s:642:"dojo.provide("dojo.dnd.autoscroll"); dojo.dnd.getViewport = function(){ // summary: returns a viewport size (visible part of the window) // FIXME: need more docs!! var d = dojo.doc, dd = d.documentElement, w = window, b = dojo.body(); if(dojo.isMozilla){ return {w: dd.clientWidth, h: w.innerHeight}; // Object }else if(!dojo.isOpera && w.innerWidth){ return {w: w.innerWidth, h: w.innerHeight}; // Object }else if (!dojo.isOpera && dd && dd.clientWidth){ return {w: dd.clientWidth, h: dd.clientHeight}; // Object }else if (b.clientWidth){ return {w: b.clientWidth, h: b.clientHeight}; // Object } return null; // Object";s:7:"returns";s:6:"Object";s:7:"summary";s:0:"";}s:19:"dojo.dnd.autoScroll";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:1430:"dojo.provide("dojo.dnd.autoscroll"); dojo.dnd.getViewport = function(){ // summary: returns a viewport size (visible part of the window) // FIXME: need more docs!! var d = dojo.doc, dd = d.documentElement, w = window, b = dojo.body(); if(dojo.isMozilla){ return {w: dd.clientWidth, h: w.innerHeight}; // Object }else if(!dojo.isOpera && w.innerWidth){ return {w: w.innerWidth, h: w.innerHeight}; // Object }else if (!dojo.isOpera && dd && dd.clientWidth){ return {w: dd.clientWidth, h: dd.clientHeight}; // Object }else if (b.clientWidth){ return {w: b.clientWidth, h: b.clientHeight}; // Object } return null; // Object }; dojo.dnd.V_TRIGGER_AUTOSCROLL = 32; dojo.dnd.H_TRIGGER_AUTOSCROLL = 32; dojo.dnd.V_AUTOSCROLL_VALUE = 16; dojo.dnd.H_AUTOSCROLL_VALUE = 16; dojo.dnd.autoScroll = function(e){ // summary: // a handler for onmousemove event, which scrolls the window, if // necesary // e: Event: // onmousemove event // FIXME: needs more docs! var v = dojo.dnd.getViewport(), dx = 0, dy = 0; if(e.clientX < dojo.dnd.H_TRIGGER_AUTOSCROLL){ dx = -dojo.dnd.H_AUTOSCROLL_VALUE; }else if(e.clientX > v.w - dojo.dnd.H_TRIGGER_AUTOSCROLL){ dx = dojo.dnd.H_AUTOSCROLL_VALUE; } if(e.clientY < dojo.dnd.V_TRIGGER_AUTOSCROLL){ dy = -dojo.dnd.V_AUTOSCROLL_VALUE; }else if(e.clientY > v.h - dojo.dnd.V_TRIGGER_AUTOSCROLL){ dy = dojo.dnd.V_AUTOSCROLL_VALUE; } window.scrollBy(dx, dy);";s:7:"summary";s:70:"a handler for onmousemove event, which scrolls the window, if necesary";s:7:"returns";s:6:"Object";}s:24:"dojo.dnd.autoScrollNodes";a:5:{s:4:"type";s:8:"Function";s:10:"parameters";a:1:{s:1:"e";a:1:{s:4:"type";s:0:"";}}s:6:"source";s:3186:"dojo.provide("dojo.dnd.autoscroll"); dojo.dnd.getViewport = function(){ // summary: returns a viewport size (visible part of the window) // FIXME: need more docs!! var d = dojo.doc, dd = d.documentElement, w = window, b = dojo.body(); if(dojo.isMozilla){ return {w: dd.clientWidth, h: w.innerHeight}; // Object }else if(!dojo.isOpera && w.innerWidth){ return {w: w.innerWidth, h: w.innerHeight}; // Object }else if (!dojo.isOpera && dd && dd.clientWidth){ return {w: dd.clientWidth, h: dd.clientHeight}; // Object }else if (b.clientWidth){ return {w: b.clientWidth, h: b.clientHeight}; // Object } return null; // Object }; dojo.dnd.V_TRIGGER_AUTOSCROLL = 32; dojo.dnd.H_TRIGGER_AUTOSCROLL = 32; dojo.dnd.V_AUTOSCROLL_VALUE = 16; dojo.dnd.H_AUTOSCROLL_VALUE = 16; dojo.dnd.autoScroll = function(e){ // summary: // a handler for onmousemove event, which scrolls the window, if // necesary // e: Event: // onmousemove event // FIXME: needs more docs! var v = dojo.dnd.getViewport(), dx = 0, dy = 0; if(e.clientX < dojo.dnd.H_TRIGGER_AUTOSCROLL){ dx = -dojo.dnd.H_AUTOSCROLL_VALUE; }else if(e.clientX > v.w - dojo.dnd.H_TRIGGER_AUTOSCROLL){ dx = dojo.dnd.H_AUTOSCROLL_VALUE; } if(e.clientY < dojo.dnd.V_TRIGGER_AUTOSCROLL){ dy = -dojo.dnd.V_AUTOSCROLL_VALUE; }else if(e.clientY > v.h - dojo.dnd.V_TRIGGER_AUTOSCROLL){ dy = dojo.dnd.V_AUTOSCROLL_VALUE; } window.scrollBy(dx, dy); }; dojo.dnd._validNodes = {"div": 1, "p": 1, "td": 1}; dojo.dnd._validOverflow = {"auto": 1, "scroll": 1}; dojo.dnd.autoScrollNodes = function(e){ // summary: // a handler for onmousemove event, which scrolls the first avaialble // Dom element, it falls back to dojo.dnd.autoScroll() // e: Event: // onmousemove event // FIXME: needs more docs! for(var n = e.target; n;){ if(n.nodeType == 1 && (n.tagName.toLowerCase() in dojo.dnd._validNodes)){ var s = dojo.getComputedStyle(n); if(s.overflow.toLowerCase() in dojo.dnd._validOverflow){ var b = dojo._getContentBox(n, s), t = dojo._abs(n, true); //console.log(b.l, b.t, t.x, t.y, n.scrollLeft, n.scrollTop); var w = Math.min(dojo.dnd.H_TRIGGER_AUTOSCROLL, b.w / 2), h = Math.min(dojo.dnd.V_TRIGGER_AUTOSCROLL, b.h / 2), rx = e.pageX - t.x, ry = e.pageY - t.y, dx = 0, dy = 0; if(dojo.isWebKit || dojo.isOpera){ // FIXME: this code should not be here, it should be taken into account // either by the event fixing code, or the dojo._abs() // FIXME: this code doesn't work on Opera 9.5 Beta rx += dojo.body().scrollLeft, ry += dojo.body().scrollTop; } if(rx > 0 && rx < b.w){ if(rx < w){ dx = -w; }else if(rx > b.w - w){ dx = w; } } //console.log("ry =", ry, "b.h =", b.h, "h =", h); if(ry > 0 && ry < b.h){ if(ry < h){ dy = -h; }else if(ry > b.h - h){ dy = h; } } var oldLeft = n.scrollLeft, oldTop = n.scrollTop; n.scrollLeft = n.scrollLeft + dx; n.scrollTop = n.scrollTop + dy; if(oldLeft != n.scrollLeft || oldTop != n.scrollTop){ return; } } } try{ n = n.parentNode; }catch(x){ n = null; } } dojo.dnd.autoScroll(e);";s:7:"summary";s:118:"a handler for onmousemove event, which scrolls the first avaialble Dom element, it falls back to dojo.dnd.autoScroll()";s:7:"returns";s:6:"Object";}s:29:"dojo.dnd.V_TRIGGER_AUTOSCROLL";a:1:{s:7:"summary";s:0:"";}s:29:"dojo.dnd.H_TRIGGER_AUTOSCROLL";a:1:{s:7:"summary";s:0:"";}s:27:"dojo.dnd.V_AUTOSCROLL_VALUE";a:1:{s:7:"summary";s:0:"";}s:27:"dojo.dnd.H_AUTOSCROLL_VALUE";a:1:{s:7:"summary";s:0:"";}s:19:"dojo.dnd.autoscroll";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:8:"dojo.dnd";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}s:4:"dojo";a:2:{s:4:"type";s:6:"Object";s:7:"summary";s:0:"";}}