Author: pyaschenko
Date: 2010-03-10 09:54:16 -0500 (Wed, 10 Mar 2010)
New Revision: 16547
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/jquery.position.js
Log:
RF-8504
Modified:
root/framework/trunk/impl/src/main/resources/META-INF/resources/jquery.position.js
===================================================================
---
root/framework/trunk/impl/src/main/resources/META-INF/resources/jquery.position.js 2010-03-10
14:53:13 UTC (rev 16546)
+++
root/framework/trunk/impl/src/main/resources/META-INF/resources/jquery.position.js 2010-03-10
14:54:16 UTC (rev 16547)
@@ -58,8 +58,8 @@
// horisontal constants: L-left, R-right, C-center, A-auto
// vertical constants: T-top, B-bottom, M-middle, A-auto
// for auto: list of joinPoint-Direction pairs
- TOOLTIP: {from:"RB", to:"AA", auto:["RBRT",
"RBLT", "RBLB", "RBRB"]},
- DROPDOWN:{from:"RB", to:"AA", auto:["RBLB",
"RTLT", "LBRB", "LTRT"]}
+ TOOLTIP: {from:"AA", to:"AA", auto:["RTRT",
"RBRT", "LTRT", "RTLT", "LTLT", "LBLT",
"RTRB", "RBRB", "LBRB", "RBLB"]},
+ DROPDOWN:{from:"AA", to:"AA", auto:["LBRB",
"LTRT", "RBLB", "RTLT"]}
};
$.addPositionType = function (type, options) {
@@ -178,11 +178,12 @@
if (p.indexOf('A')<0) {
return getPositionRect(baseRect, rectOffset, elementDim, p);
} else {
+ var flag = p=="AAAA";
var pos;
for (var i = 0; i<options.auto.length; i++) {
// TODO: draft functional
- pos = __mergePos(p, options.auto[i]);
+ pos = flag ? options.auto[i] : __mergePos(p, options.auto[i]);
rect = getPositionRect(baseRect, rectOffset, elementDim, pos);
ox = rect.left; oy = rect.top;
s = checkCollision(rect, windowRect);
@@ -195,36 +196,6 @@
}
}
- /*
- // jointPoint: bottom-right, direction: bottom-left
- var basex = baseRect.left - rectOffset.left;
- var basey = baseRect.top + rectOffset.top;
- var rect = {right: basex + baseRect.width, top: basey + baseRect.height};
- rect.left = rect.right - elementDim.width;
- rect.bottom = rect.top + elementDim.height;
-
- // jointPoint: top-right, direction: top-left
- basex = baseRect.left - rectOffset.left;
- basey = baseRect.top - rectOffset.top;
- rect = {right: basex + baseRect.width, bottom: basey};
- rect.left = rect.right - elementDim.width;
- rect.top = rect.bottom - elementDim.height;
-
- // jointPoint: bottom-left, direction: bottom-right
- basex = baseRect.left + rectOffset.left;
- basey = baseRect.top + rectOffset.top;
- rect = {left: basex, top: basey + baseRect.height};
- rect.right = rect.left + elementDim.width;
- rect.bottom = rect.top + elementDim.height;
-
- // jointPoint: top-left, direction: top-right
- basex = baseRect.left + rectOffset.left;
- basey = baseRect.top + rectOffset.top;
- rect = {left: basex, bottom: basey};
- rect.right = rect.left + elementDim.width;
- rect.top = rect.bottom - elementDim.height;
- }*/
-
return {left:ox, top:oy};
}