We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7070d83 commit c6264daCopy full SHA for c6264da
workflow-trace-viewer/src/jvmMain/kotlin/com/squareup/workflow1/traceviewer/util/SandboxBackground.kt
@@ -48,8 +48,8 @@ public fun SandboxBackground(
48
val event = awaitPointerEvent()
49
if (event.type == PointerEventType.Scroll) {
50
val scrollDelta = event.changes.first().scrollDelta.y
51
- sandboxState.scale = (sandboxState.scale * if (scrollDelta < 0) 1.1f else 0.9f)
52
- .coerceIn(0.1f, 10f)
+ val factor = 1f + (-scrollDelta * 0.1f)
+ sandboxState.scale = (sandboxState.scale * factor).coerceIn(0.1f, 10f)
53
event.changes.forEach { it.consume() }
54
}
55
0 commit comments