mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
feat(map): tap worked cells from GRID_ZOOM_SUB (lines visible), labels from zoom 6.5
- Tap-to-show-QSOs now works as soon as 4-char grid lines appear (zoom 6), not only when 4-char labels show (was zoom 7). Selection outline already used GRID_ZOOM_SUB, so feedback is immediate. - 4-char labels now appear from zoom 6.5 (was 7.0), so the sub-square name shows shortly after the lines appear instead of a full zoom level later.
This commit is contained in:
1 parent
da1facac64
commit
11b46c6710
2 files changed
+5
-3
No files matched your search
+2
-2
@@ -415,8 +415,8 @@ class MaidenheadGridOverlay : Overlay() {
|
||||
// on-screen size of each square.
|
||||
const val GRID_ZOOM_SUB = 6.0
|
||||
// Zoom at which the 4-char sub-square names appear (one level above the
|
||||
// grid lines: zoom 6 = lines only, zoom 7+ = lines + names).
|
||||
const val LABEL_ZOOM_SUB = 7.0
|
||||
// grid lines: zoom 6 = lines only, zoom 6.5+ = lines + names).
|
||||
const val LABEL_ZOOM_SUB = 6.5
|
||||
const val MIN_LABEL_CELL_PX = 48f
|
||||
const val MAX_OVERSHOOT_PX = 64
|
||||
}
|
||||
|
||||
@@ -153,7 +153,9 @@ private fun MapScreen(uiState: MapState, onAction: (MapAction) -> Unit, mapView:
|
||||
override fun singleTapConfirmedHelper(p: GeoPoint?): Boolean {
|
||||
if (!isGridMode || p == null) return false
|
||||
val zoom = mapView.zoomLevelDouble
|
||||
if (zoom < MaidenheadGridOverlay.LABEL_ZOOM_SUB) return false
|
||||
// Allow tapping worked cells as soon as the 4-char grid LINES
|
||||
// appear (GRID_ZOOM_SUB), not only when labels show (LABEL_ZOOM_SUB).
|
||||
if (zoom < MaidenheadGridOverlay.GRID_ZOOM_SUB) return false
|
||||
val grid = gridOfPoint(p.latitude, p.longitude) ?: return false
|
||||
if (grid !in workedGrids) return false
|
||||
selectedGrid = grid
|
||||
|
||||
Reference in new issue
Block a user