Skip to content

Commit c6d66f4

Browse files
committed
Use captured pointer events for ArcBallController
1 parent bc58750 commit c6d66f4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
- Fixed multisampled raw download
2+
- Use captured pointer events for ArcBallController
23

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

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,14 +288,12 @@ module ArcBallController =
288288
let attributes (state : AdaptiveCameraControllerState) (f : Message -> 'msg) =
289289
AttributeMap.ofListCond [
290290
always (onBlur (fun _ -> f Blur))
291-
always (onMouseDown (fun b p -> f (Down(b,p))))
292-
//always (onCapturedPointerDown (Some 2) (fun t b p -> match t with Mouse -> f (Down(b,p)) | _ -> f (Down(b,p))))
293-
//always (onCapturedPointerUp (Some 2) (fun t b p -> match t with Mouse -> f (Up(b)) | _ -> f (Down(b,p))))
294-
always (onMouseUp (fun b p -> f (Up b)))
291+
always (onCapturedPointerDown None (fun t b p -> match t with Mouse -> f (Down(b,p)) | _ -> f (Down(b,p))))
292+
always (onCapturedPointerUp None (fun t b p -> match t with Mouse -> f (Up(b)) | _ -> f (Down(b,p))))
295293
always (onKeyDown (KeyDown >> f))
296294
always (onKeyUp (KeyUp >> f))
297295
always (onWheelPrevent true (fun x -> f (Wheel x)))
298-
onlyWhen (state.look %|| state.pan %|| state.zoom) (onMouseMove (Move >> f))
296+
onlyWhen (state.look %|| state.pan %|| state.zoom) (onCapturedPointerMove None (fun t p -> match t with Mouse -> f (Move p) | _ -> f Nop ))
299297
]
300298

301299
let extractAttributes (state : AdaptiveCameraControllerState) (f : Message -> 'msg) =

0 commit comments

Comments
 (0)