You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by sm...@apache.org on 2006/12/10 01:54:37 UTC
svn commit: r485113 -
/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
Author: smilek
Date: Sat Dec 9 16:54:35 2006
New Revision: 485113
URL: http://svn.apache.org/viewvc?view=rev&rev=485113
Log:
changed PortletWindowDragMoveObject.onDragMove to be less picky about column selection while dragging (making it easier to drag a window below the current bottom of a column)
Modified:
portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
Modified: portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js?view=diff&rev=485113&r1=485112&r2=485113
==============================================================================
--- portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js (original)
+++ portals/jetspeed-2/trunk/src/webapp/javascript/jetspeed/widget/PortletWindow.js Sat Dec 9 16:54:35 2006
@@ -1953,22 +1953,38 @@
var offsetWidthHalf = this.domNode.offsetWidth / 2;
var offsetHeightHalf = this.domNode.offsetHeight / 2;
var noOfCols = jetspeed.page.columns.length;
- for ( var i = 0 ; i < noOfCols ; i++ )
+ for ( var tries = 1 ; tries <= 2 ; tries++ )
{
- var colDims = this.columnDimensions[ i ];
- if ( colDims != null )
+ for ( var i = 0 ; i < noOfCols ; i++ )
{
- var xTest = x + offsetWidthHalf;
- if ( xTest >= colDims.left && xTest <= colDims.right )
+ var colDims = this.columnDimensions[ i ];
+ if ( colDims != null )
{
- var yTest = y + offsetHeightHalf;
- if ( yTest >= colDims.top && yTest <= colDims.bottom )
+ var xTest = x + offsetWidthHalf;
+ if ( xTest >= colDims.left && xTest <= colDims.right )
{
- colIndex = i;
- break;
+ var yTest = y + offsetHeightHalf;
+ if ( tries == 1 )
+ {
+ if ( yTest >= colDims.top && yTest <= colDims.bottom )
+ {
+ colIndex = i;
+ break;
+ }
+ }
+ else
+ {
+ if ( yTest >= (colDims.top - 30) && yTest <= (colDims.bottom + 200) )
+ {
+ colIndex = i;
+ break;
+ }
+ }
}
}
}
+ if ( colIndex != -1 )
+ break ;
}
var col = ( colIndex >= 0 ? jetspeed.page.columns[ colIndex ] : null );
//if ( col != null )
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org