diff --git a/src/main/kotlin/solve/scene/controller/SceneController.kt b/src/main/kotlin/solve/scene/controller/SceneController.kt index 4f4f20de..5debcc4a 100644 --- a/src/main/kotlin/solve/scene/controller/SceneController.kt +++ b/src/main/kotlin/solve/scene/controller/SceneController.kt @@ -8,7 +8,6 @@ import solve.scene.model.Scene import solve.scene.view.SceneView import solve.utils.ServiceLocator import solve.utils.ceilToInt -import solve.utils.structures.DoublePoint import tornadofx.Controller import tornadofx.onChange import kotlin.math.max @@ -199,7 +198,7 @@ class SceneController : Controller() { max( installedMinScale, sceneWidthProperty.value / ((scene.frameSize.width + SceneView.framesMargin) * columnsNumber) * - SceneCanvas.IdentityFramesSizeScale + SceneCanvas.IdentityFramesSizeScale ), DefaultMaxScale ) diff --git a/src/main/kotlin/solve/scene/view/SceneView.kt b/src/main/kotlin/solve/scene/view/SceneView.kt index a169e599..f1a29a46 100644 --- a/src/main/kotlin/solve/scene/view/SceneView.kt +++ b/src/main/kotlin/solve/scene/view/SceneView.kt @@ -81,19 +81,22 @@ class SceneView : View() { mouseScreenPoint = extrudeEventMousePosition(event) } root.setOnMouseDragged { event -> - if (event.button != MouseDragButton) + if (event.button != MouseDragButton) { return@setOnMouseDragged + } mouseScreenPoint = extrudeEventMousePosition(event) canvas.dragTo(mouseScreenPoint) } root.setOnMousePressed { event -> - if (event.button != MouseDragButton) + if (event.button != MouseDragButton) { return@setOnMousePressed + } canvas.startDragging(mouseScreenPoint) } root.setOnMouseReleased { event -> - if (event.button != MouseDragButton) + if (event.button != MouseDragButton) { return@setOnMouseReleased + } canvas.stopDragging() } root.setOnScroll { event ->