fix:处理tooltip 超出高度后 向上显示
This commit is contained in:
@@ -575,10 +575,10 @@
|
|||||||
}else{
|
}else{
|
||||||
x = pointX - boxWidth;
|
x = pointX - boxWidth;
|
||||||
}
|
}
|
||||||
if(windowMouse.y + 15 +boxHeight<windowHeight){//说明鼠标上面放不下提示框
|
if(windowMouse.y + 50 +boxHeight<windowHeight){//说明鼠标上面放不下提示框
|
||||||
y = pointY + 15;
|
y = pointY + 15;
|
||||||
}else {
|
}else {
|
||||||
y = pointY - boxHeight - 15;
|
y = pointY - boxHeight - 10;
|
||||||
}
|
}
|
||||||
return [x,y];
|
return [x,y];
|
||||||
}else {//preview page
|
}else {//preview page
|
||||||
@@ -588,10 +588,10 @@
|
|||||||
}else{
|
}else{
|
||||||
x = pointX - boxWidth - 15;
|
x = pointX - boxWidth - 15;
|
||||||
}
|
}
|
||||||
if(windowMouse.y + 15 +boxHeight<windowHeight){//说明鼠标上面放不下提示框
|
if(windowMouse.y + 50 +boxHeight<windowHeight){//说明鼠标上面放不下提示框
|
||||||
y = pointY + 15;
|
y = pointY + 15;
|
||||||
}else {
|
}else {
|
||||||
y = pointY - boxHeight - 15;
|
y = pointY - boxHeight - 10;
|
||||||
}
|
}
|
||||||
return [x,y];
|
return [x,y];
|
||||||
}
|
}
|
||||||
@@ -601,10 +601,10 @@
|
|||||||
}else{
|
}else{
|
||||||
x = pointX - boxWidth;
|
x = pointX - boxWidth;
|
||||||
}
|
}
|
||||||
if(windowMouse.y + 15 +boxHeight<windowHeight){//说明鼠标上面放不下提示框
|
if(windowMouse.y + 50 +boxHeight<windowHeight){//说明鼠标上面放不下提示框
|
||||||
y = pointY + 15;
|
y = pointY + 15;
|
||||||
}else {
|
}else {
|
||||||
y = pointY - boxHeight - 15;
|
y = pointY - boxHeight - 10;
|
||||||
}
|
}
|
||||||
return [x,y];
|
return [x,y];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user