mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
http://issues.alfresco.com/browse/AWC-1260 http://issues.alfresco.com/browse/AWC-1170 Improvement of alignment for pop-up panel - was rendering off the top of the screen if the preview text was very large vertically. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5877 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -345,6 +345,7 @@ function getContextPath()
|
||||
if (elWidth > maxwidth) elWidth = maxwidth;
|
||||
}
|
||||
var docWidth = this.getDocumentWidth();
|
||||
var shiftedLeft = false;
|
||||
if (pos.x + 20 + elWidth < docWidth)
|
||||
{
|
||||
el.style.left = (pos.x + 20) + "px";
|
||||
@@ -353,6 +354,7 @@ function getContextPath()
|
||||
{
|
||||
// Shifting X coord left - overflow
|
||||
el.style.left = (pos.x + 20 - ((pos.x + elWidth) - docWidth)) + "px";
|
||||
shiftedLeft = true;
|
||||
}
|
||||
if (pos.y + 12 + elHeight < this.getDocumentHeight())
|
||||
{
|
||||
@@ -361,7 +363,17 @@ function getContextPath()
|
||||
else
|
||||
{
|
||||
// Shifting Y coord up - overflow
|
||||
el.style.top = (pos.y - elHeight + 4) + "px";
|
||||
if (shiftedLeft == true)
|
||||
{
|
||||
el.style.top = (pos.y - elHeight + 4) + "px";
|
||||
}
|
||||
else
|
||||
{
|
||||
// we have room to shift vertically without overwriting the pop-up icon
|
||||
var ypos = (pos.y - elHeight + 4);
|
||||
if (ypos < 0) ypos = 0;
|
||||
el.style.top = ypos + "px";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user