From 01f1ba4d8878b798f7feb6b1f66806402b99a840 Mon Sep 17 00:00:00 2001 From: rnowak Date: Mon, 7 Oct 2024 16:06:15 +0200 Subject: [PATCH] fix issue with panning #344 --- src/PRo3D.Viewer/Viewer/Viewer.fs | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/src/PRo3D.Viewer/Viewer/Viewer.fs b/src/PRo3D.Viewer/Viewer/Viewer.fs index 68a613bc..f8c3a4b7 100644 --- a/src/PRo3D.Viewer/Viewer/Viewer.fs +++ b/src/PRo3D.Viewer/Viewer/Viewer.fs @@ -429,7 +429,7 @@ module ViewerApp = (msg : ViewerAction) = //Log.line "[Viewer_update] %A inter:%A pick:%A" msg m.interaction m.picking match msg, m.interaction, m.ctrlFlag with - | NavigationMessage msg,_,false when (isGrabbed m |> not) && (not (AnimationApp.shouldAnimate m.animations)) -> + | NavigationMessage msg,_,false when (isGrabbed m |> not) && (not (AnimationApp.shouldAnimate m.animations)) -> let c = m.scene.config let ref = m.scene.referenceSystem let nav = Navigation.update c ref navConf true m.navigation msg @@ -1394,15 +1394,26 @@ module ViewerApp = // | true -> // Log.line "[Viewer] No shattercone updates found." // m - | StartDragging _,_,_ - | Dragging _,_,_ - //| MouseOut _,_,_ - | EndDragging _,_,_ -> + | StartDragging _,_,_ -> + let m' = + match m.multiSelectBox with + | Some x -> { m with multiSelectBox = None } + | None -> m + m' + | Dragging _,_,_ -> + let m' = + match m.multiSelectBox with + | Some x -> { m with multiSelectBox = None } + | None -> m + m' + | EndDragging (mousePos, mouseButton) ,_,_ -> let m' = match m.multiSelectBox with | Some x -> { m with multiSelectBox = None } | None -> m - m' //{m' with navigation = {m'.navigation with camera = {m'.navigation.camera with pan = false }}} + let m' = + {m' with navigation = {m'.navigation with camera = {m'.navigation.camera with pan = false }}} + m' | MouseIn _,_,_ -> {m with navigation = {m.navigation with camera = {m.navigation.camera with pan = true }}} | MouseOut _,_,_ ->