Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kerfuffles authored and Zallist committed Sep 23, 2022
1 parent 3f06efa commit 34298c1
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1359,9 +1359,10 @@ public void HandleEvents(SceneView sceneView, Rect sceneRect)
var inCamera = (camera != null) && camera.pixelRect.Contains(Event.current.mousePosition);

var originalEventType = Event.current.type;
if (originalEventType == EventType.MouseMove) { mouseIsDragging = false; draggingOnCamera = null; realMousePosition = Event.current.mousePosition; }
else if (originalEventType == EventType.MouseDown) { mouseIsDragging = false; draggingOnCamera = camera; realMousePosition = prevMousePos = Event.current.mousePosition; }
else if (originalEventType == EventType.MouseUp) { draggingOnCamera = null; }
if( Event.current.type == EventType.MouseMove ) { sceneView.Repaint(); }
else if (originalEventType == EventType.MouseMove) { mouseIsDragging = false; draggingOnCamera = null; realMousePosition = Event.current.mousePosition; }
else if (originalEventType == EventType.MouseDown) { mouseIsDragging = false; draggingOnCamera = camera; realMousePosition = prevMousePos = Event.current.mousePosition; }
else if (originalEventType == EventType.MouseUp) { draggingOnCamera = null; }
else if (originalEventType == EventType.MouseDrag)
{
if (!mouseIsDragging && (prevMousePos - Event.current.mousePosition).sqrMagnitude > 4.0f)
Expand Down

0 comments on commit 34298c1

Please sign in to comment.