lets-plot-compose/src/androidMain/kotlin/org/jetbrains/letsPlot/compose/PlotPanelComposeCanvas.kt [313:347]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } else { mouseEventPeer.dispatch(MOUSE_MOVED, mouseEvent) } } PointerEventType.Enter -> { mouseEventPeer.dispatch(MOUSE_ENTERED, mouseEvent) } PointerEventType.Exit -> { mouseEventPeer.dispatch(MOUSE_LEFT, mouseEvent) } PointerEventType.Scroll -> { val scrollDelta = change.scrollDelta val wheelMouseEvent = MouseWheelEvent( x = vector.x, y = vector.y, button = Button.NONE, modifiers = KeyModifiers.emptyModifiers(), scrollAmount = scrollDelta.y.toDouble() ) mouseEventPeer.dispatch(MOUSE_WHEEL_ROTATED, wheelMouseEvent) } } } } } private fun dispatchClick(position: Offset, clickCount: Int, density: Double) { // Convert logical pixel coordinates to physical pixel coordinates for SVG interaction val adjustedX = ((position.x / density) - offsetX).roundToInt() val adjustedY = ((position.y / density) - offsetY).roundToInt() val vector = Vector(adjustedX, adjustedY) val mouseEvent = MouseEvent.leftButton(vector) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - lets-plot-compose/src/desktopMain/kotlin/org/jetbrains/letsPlot/compose/ComposeMouseEventMapper.kt [76:110]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - } else { mouseEventPeer.dispatch(MOUSE_MOVED, mouseEvent) } } PointerEventType.Enter -> { mouseEventPeer.dispatch(MOUSE_ENTERED, mouseEvent) } PointerEventType.Exit -> { mouseEventPeer.dispatch(MOUSE_LEFT, mouseEvent) } PointerEventType.Scroll -> { val scrollDelta = change.scrollDelta val wheelMouseEvent = MouseWheelEvent( x = vector.x, y = vector.y, button = Button.NONE, modifiers = KeyModifiers.emptyModifiers(), scrollAmount = scrollDelta.y.toDouble() ) mouseEventPeer.dispatch(MOUSE_WHEEL_ROTATED, wheelMouseEvent) } } } } } private fun dispatchClick(position: Offset, clickCount: Int, density: Double) { // Convert logical pixel coordinates to physical pixel coordinates for SVG interaction val adjustedX = ((position.x / density) - offsetX).roundToInt() val adjustedY = ((position.y / density) - offsetY).roundToInt() val vector = Vector(adjustedX, adjustedY) val mouseEvent = MouseEvent.leftButton(vector) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -