Incorporate outfoxxed feedback
This commit is contained in:
@@ -81,6 +81,12 @@ PopupWindow {
|
||||
var window = target.QsWindow.window
|
||||
if (!window) return
|
||||
|
||||
if (root.bar.position === "top" || root.bar.position === "bottom") {
|
||||
localX = Math.max(root.margin, Math.min(localX, window.width - popupWidth - root.margin))
|
||||
} else {
|
||||
localY = Math.max(root.margin, Math.min(localY, window.height - popupHeight - root.margin))
|
||||
}
|
||||
|
||||
var point = window.contentItem.mapFromItem(target, localX, localY)
|
||||
popupAnchor.rect.x = Math.round(point.x)
|
||||
popupAnchor.rect.y = Math.round(point.y)
|
||||
|
||||
Reference in New Issue
Block a user