INNER CODE UNIT · Kotlin
h
fjossinet/RNArtist · src/main/kotlin/RNArtist.kt:425
val h = Math.sqrt((diag * diag) / (1 + ratio * ratio))
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()
}
}
}