Function doScroll in ddm2 consist such code for scrolling a target container.
function doScroll(direction, distance) {
if( !def.autoScroll ) return;
var x = dd_container.scroll(#left);
var y = dd_container.scroll(#top);
switch(direction) {
case 8: dd_container.scrollTo(x, y - distance * AUTO_SCROLL_DELTA); break; // top
case 2: dd_container.scrollTo(x, y + distance * AUTO_SCROLL_DELTA); break; // bottom
case 4: dd_container.scrollTo(x - distance * AUTO_SCROLL_DELTA, y); break; // left
case 2: dd_container.scrollTo(x + distance * AUTO_SCROLL_DELTA, y); break; // right
}
return true;
}
But calls of this function seems like:
if( yv < y1 ) dd_container.sendEvent("drag-n-drop-ping", 8) || doScroll(8, y1 - yv); // generate "ping" event in case of UI need to scroll, etc.
else if( yv > y2 ) dd_container.sendEvent("drag-n-drop-ping", 2) || doScroll(2, yv - y2); // evt.data -> direction
else if( xv < x1 ) dd_container.sendEvent("drag-n-drop-ping", 4) || doScroll(4, x1 - xv);
else if( xv > x2 ) dd_container.sendEvent("drag-n-drop-ping", 6) || doScroll(6, xv > x2);
So, look on the doScroll with first argument 6. In switch statement this value doesn't handled and right scroll doesn't occured. Probably there is a copy-pase error inside doScroll function and correct code is:
function doScroll(direction, distance) {
if( !def.autoScroll ) return;
var x = dd_container.scroll(#left);
var y = dd_container.scroll(#top);
switch(direction) {
case 8: dd_container.scrollTo(x, y - distance * AUTO_SCROLL_DELTA); break; // top
case 2: dd_container.scrollTo(x, y + distance * AUTO_SCROLL_DELTA); break; // bottom
case 4: dd_container.scrollTo(x - distance * AUTO_SCROLL_DELTA, y); break; // left
case 6: dd_container.scrollTo(x + distance * AUTO_SCROLL_DELTA, y); break; // right
}
return true;
}
Function doScroll in ddm2 consist such code for scrolling a target container.
But calls of this function seems like:
So, look on the doScroll with first argument 6. In switch statement this value doesn't handled and right scroll doesn't occured. Probably there is a copy-pase error inside doScroll function and correct code is: