Skip to content

Commit

Permalink
Adjust with crosshairCircle.width / height.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsenD98 authored and github-actions[bot] committed Feb 19, 2025
1 parent 964612f commit 7fe16e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qml/CoordinateLocator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ Item {
function flash() {
flashAnimation.start();
if (positionLocked) {
const outOfScreen = crosshairCircle.x <= 0 || crosshairCircle.x >= mainWindow.width || crosshairCircle.y <= 0 || crosshairCircle.y >= mainWindow.height;
const outOfScreen = crosshairCircle.x + crosshairCircle.width <= 0 || crosshairCircle.x - crosshairCircle.width >= mainWindow.width || crosshairCircle.y + crosshairCircle.height <= 0 || crosshairCircle.y - crosshairCircle.height >= mainWindow.height;
if (outOfScreen) {
mapCanvas.mapSettings.setCenter(positionSource.projectedPosition, true);
}
Expand Down

0 comments on commit 7fe16e7

Please sign in to comment.