void OnPointerDown(PointerDownEvent e) { if (m_Active) { e.StopImmediatePropagation(); return; } if (CanStartManipulation(e)) { var ve = (e.currentTarget as VisualElement); m_Header = ve.GetFirstAncestorOfType <MultiColumnCollectionHeader>(); preview = m_Column.collection.resizePreview; if (preview) { if (m_PreviewElement == null) { m_PreviewElement = new MultiColumnHeaderColumnResizePreview(); } VisualElement previewParent = m_Header.GetFirstAncestorOfType <ScrollView>()?.parent ?? m_Header.parent; previewParent.hierarchy.Add(m_PreviewElement); } columnLayout = m_Header.columnLayout; m_Start = ve.ChangeCoordinatesTo(m_Header, e.localPosition); BeginDragResize(m_Start.x); m_Active = true; target.CaptureMouse(); e.StopPropagation(); } }
void OnPointerDown(PointerDownEvent evt) { if (CanStartManipulation(evt)) { m_Panning = true; m_ActivatingButton = evt.button; target.CaptureMouse(); evt.StopImmediatePropagation(); } }
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(); } } }
protected void OnPointerDown(PointerDownEvent e) { if (m_Active) { e.StopImmediatePropagation(); return; } if (CanStartManipulation(e)) { m_Start = e.localPosition; m_Active = true; target.CapturePointer(e.pointerId); e.StopPropagation(); } }