Hey! Could Compose’s platform gesture APIs be exte...
# compose
s
Hey! Could Compose’s platform gesture APIs be extended to support trackpad rotation and smart zoom (like macOS’s two-finger double tap)? The existing `PanStart`/`PanMove`/`PanEnd` and `ScaleStart`/`ScaleChange`/`ScaleEnd` APIs are useful; Nucleus on desktop wires them up to macOS trackpad gestures, so I can get really nice map controls with MapLibre Compose. I'd mainly need the equivalent API wiring through
ComposeScene.sendPointerEvent
and pointer input. Smart zoom would ideally be a distinct event with a position, so the app can decide what to zoom to. Is extending the existing APIs in that direction something Google/Jetbrains would consider? I assume it'd have to land in Android's Jetpack Compose and then in Compose Multiplatform?
👀 1
relevant Apple docs: - magnify(with:): pinch gesture on trackpad. Nucleus wires this to Compose's scale events, in a draft - rotate(with:): rotate gesture on trackpad. Compose has no equivalent - smartMagnify(with:): two finger double tap on trackpad. Compose has no equivalent
s
Can you please file a feature request? Not a guarantee that it'd be addressed, but better to have it in the issue tracker than here 🙂
Might be more relevant for the Compose desktop tracker than the Google one btw
s
Will do. I think right now, Android is the only platform where pan and scale gestures are already wired up by default, so I was unsure if the Google tracker was actually more relevant for it or not