Example #1
0
 private void OnPointerDown(PointerDownEvent evt)
 {
     tooltip.text = "PointerDown!";
     UpdateTooltipPosition(evt.localPosition);
     mainArea.AddToClassList("main-area--active");
     mainArea.CapturePointer(evt.pointerId);
 }
 private void UpdateValueOnPointerDown(PointerDownEvent evt)
 {
     if (CanStartDrag(evt.button, evt.localPosition))
     {
         if (evt.pointerId != PointerId.mousePointerId)
         {
             evt.PreventDefault();
             m_DragElement.CapturePointer(evt.pointerId);
             ProcessDownEvent(evt);
         }
         else
         {
             evt.StopImmediatePropagation();
         }
     }
 }