Skip to content

Commit

Permalink
Add terrain double tap support in Android version.
Browse files Browse the repository at this point in the history
  • Loading branch information
EMaksymenko committed Oct 9, 2024
1 parent c19b77d commit fb7f4ae
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {

allprojects {
group = "earth.worldwind"
version = "1.5.23"
version = "1.5.24"

extra.apply {
set("minSdk", 21)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ open class SelectDragDetector(protected val wwd: WorldWindow) : SimpleOnGestureL
val callback = callback ?: return false
return runBlocking {
val (renderable, position) = awaitPickResult(false)
if (renderable is Renderable && position != null) {
callback.onRenderableDoubleTap(renderable, position)
if (position != null) {
if (renderable is Renderable) callback.onRenderableDoubleTap(renderable, position)
else callback.onTerrainDoubleTap(position)
wwd.requestRedraw()
true
} else false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,11 @@ interface SelectDragCallback {
* @param position picked terrain or renderable center position
*/
fun onRenderableDoubleTap(renderable: Renderable, position: Position) {}

/**
* Terrain position was double-tapped or double-clicked
*
* @param position picked terrain position
*/
fun onTerrainDoubleTap(position: Position) {}
}

0 comments on commit fb7f4ae

Please sign in to comment.