immutable_features #24

Merged
altavir merged 7 commits from immutable_features into dev 2024-07-08 11:56:05 +03:00
Showing only changes of commit 5da7ee7944 - Show all commits

View File

@ -36,7 +36,7 @@ public fun <T : Any> Modifier.canvasControls(
val point = state.space.ViewPoint(coordinates, zoom) val point = state.space.ViewPoint(coordinates, zoom)
if (event.type == PointerEventType.Move) { if (event.type == PointerEventType.Move) {
features.forEachWithAttribute(HoverListenerAttribute) { id, feature, listeners -> features.forEachWithAttribute(HoverListenerAttribute) { _, feature, listeners ->
altavir marked this conversation as resolved Outdated

Does id argument is really needed here?

Does `id` argument is really needed here?

It should be ref and no, it is probably not needed.

It should be ref and no, it is probably not needed.
if (point in feature as DomainFeature) { if (point in feature as DomainFeature) {
listeners.forEach { it.handle(event, point) } listeners.forEach { it.handle(event, point) }
return@forEachWithAttribute return@forEachWithAttribute