INNER CODE UNIT · Kotlin
w
fjossinet/RNArtist · src/main/kotlin/RNArtist.kt:426
val w = ratio * h*/
mediator.canvas2D.zoomArea =
Rectangle2D.Double(it.x, it.y, dragX, dragY)
}
}
mediator.canvas2D.repaint()
} else if (mouseEvent.button == MouseButton.SECONDARY) {
it.quickDraw = true
val transX: Double = mouseEvent.x - mediator.canvas2D.transX
val transY: Double = mouseEvent.y - mediator.canvas2D.transY
it.workingSession.moveView(transX, transY)
mediator.canvas2D.transX = mouseEvent.x
mediator.canvas2D.transY = mouseEvent.y
mediator.canvas2D.repaint()
}
}
}
swingNode.onMouseReleased = EventHandler { mouseEvent: MouseEvent ->