popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() {
public void setPosition(int offsetWidth, int offsetHeight) {
int r = getToothNumber();
if(r == 14 || r == 15 || r == 16) {
popup.setPopupPosition(event.getClientX() - 170, event.getClientY());
popup.show();
} else if(r > 16) {
popup.setPopupPosition(event.getClientX() - 56, event.getClientY() - 550);
popup.show();
} else {
popup.setPopupPosition(event.getClientX() + 22, event.getClientY());
popup.show();
}
}
});
答案 0 :(得分:0)
您的代码应始终显示弹出窗口。问题可能不在您显示的代码中。我的猜测是你不只是隐藏弹出窗口。您可能正在销毁它,在这种情况下show()将无法正常工作。请尝试始终创建一个新的弹出窗口,而不是重复使用它。