Skip to content

Commit 0187944

Browse files
committed
Disable preventDefault on middle mouse button for FreeFllyContoller
Breaks pointer capture for middle mouse button when using iframes (e.g. Golden Layout).
1 parent c6d66f4 commit 0187944

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
- Fixed multisampled raw download
22
- Use captured pointer events for ArcBallController
3+
- Fix pointer capture for middle mouse button in FreeFlyController when using iframes
34

45
### 5.5.2
56
- updated Adaptify.Core to 1.3.0 (using local, new style adaptify)

src/Aardvark.UI.Primitives/Controllers/FreeFlyController.fs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,11 @@ module FreeFlyController =
610610
let attributes (state : AdaptiveCameraControllerState) (f : Message -> 'msg) =
611611
AttributeMap.ofListCond [
612612
always (onBlur (fun _ -> f Blur))
613-
always (onCapturedPointerDown (Some 2) (fun t b p -> match t with Mouse -> f (Down(b,p)) | _ -> f Nop))
614-
always (onCapturedPointerUp (Some 2) (fun t b p -> match t with Mouse -> f (Up(b)) | _ -> f Nop))
613+
always (onCapturedPointerDown None (fun t b p -> match t with Mouse -> f (Down(b,p)) | _ -> f Nop))
614+
always (onCapturedPointerUp None (fun t b p -> match t with Mouse -> f (Up(b)) | _ -> f Nop))
615615
onlyWhen
616616
(state.look %|| state.pan %|| state.dolly %|| state.zoom)
617-
(onCapturedPointerMove (Some 2) (fun t p -> match t with Mouse -> f (Move p) | _ -> f Nop ))
617+
(onCapturedPointerMove None (fun t p -> match t with Mouse -> f (Move p) | _ -> f Nop ))
618618
always (onKeyDownModifiers (fun m k -> KeyDown(m,k) |> f))
619619
always (onKeyUpModifiers (fun m k -> KeyUp(m,k) |> f))
620620
always (onWheelPrevent true (fun x -> f (Wheel x)))

0 commit comments

Comments
 (0)