private void MouseDownHandler(Mouse3DPosition mouseData) { if (_currentHandler == null) { return; } _currentHandler.previousMousePosition = mouseData.Point.GpPnt; _currentHandler.startX = mouseData.Initial2Dx; _currentHandler.startY = mouseData.Initial2Dy; var selectedNodes = NodeBuilderUtils.IdentifyShapesUnderMouse(_editingDocument.Root, mouseData.Initial2Dx, mouseData.Initial2Dy, ViewInfo.View); if (selectedNodes.Count <= 0 && (_currentHandler.SelectedEntity == null || _currentHandler.SelectedEntity.Node == null)) { return; } if (selectedNodes.Count > 0) { _currentHandler.StartDragging(selectedNodes[0]); } else { _currentHandler.StartDragging(_currentHandler.SelectedEntity); } var pusherInput = ActionsGraph[InputNames.CommandLinePrePusher]; pusherInput.Send(NotificationNames.Reset); pusherInput.Send(NotificationNames.PushValue, _currentHandler); pusherInput.Send(NotificationNames.PushValue, _editingDocument); _editingDocument.Transact(); ViewInfo.SwitchAction(ModifierNames.HandleDragging); }
private void MouseDownHandler(Mouse3DPosition mouseData) { if (_currentHandler == null) { return; } var selectedNodes = NodeBuilderUtils.IdentifyShapesUnderMouse(_gizmoDocument.Root, mouseData.Initial2Dx, mouseData.Initial2Dy, ViewInfo.View); if (selectedNodes.Count <= 0) { return; } _currentHandler.StartDragging(selectedNodes[0]); var pusherInput = ActionsGraph[InputNames.CommandLinePrePusher]; pusherInput.Send(NotificationNames.Reset); pusherInput.Send(NotificationNames.PushValue, _currentHandler); pusherInput.Send(NotificationNames.PushValue, _gizmoDocument); _gizmoDocument.Transact(); ViewInfo.SwitchAction(ModifierNames.HandleDragging); }