Skip to content

Commit

Permalink
Fix an issue where Spatial Menu could interrupt manipulator and other…
Browse files Browse the repository at this point in the history
… UI drag operations
  • Loading branch information
mtschoen-unity committed Aug 20, 2020
1 parent 3acd7d9 commit a4aa8e5
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,20 @@ public void ProcessInput(ActionMapInput input, ConsumeControlDelegate consumeCon
m_Owner.ProcessMove(eventData);
m_Owner.ProcessDrag(eventData, true);

var verticalScroll = uiActions.verticalScroll;
var horizontalScroll = uiActions.horizontalScroll;
if (eventData.dragging)
{
consumeControl(verticalScroll);
consumeControl(horizontalScroll);
}

// Send scroll events
if (currentObject)
{
var hasScrollHandler = ExecuteEvents.GetEventHandler<IScrollHandler>(currentObject);
if (hasScrollHandler)
{
var verticalScroll = uiActions.verticalScroll;
var horizontalScroll = uiActions.horizontalScroll;
var verticalScrollValue = verticalScroll.value;
var horizontalScrollValue = horizontalScroll.value;
if (!Mathf.Approximately(verticalScrollValue, 0f) || !Mathf.Approximately(horizontalScrollValue, 0f))
Expand Down

0 comments on commit a4aa8e5

Please sign in to comment.