Translating of a line

Hello! I assigned the function of moving a line to the left mouse button. But as a result, the function of moving of individual points of the line stopped working.

How can I make it so that when you hover the mouse over the line itself and hold down the left mouse button, the entire line is translated, and when you hover the cursor over a separate point of the line and hold down the left mouse button, only this point of the line begins to translate?

This is my code for translating a line by left mouse button pressing:

sliceViewLabel = "Red"
sliceViewWidget = slicer.app.layoutManager().sliceWidget(sliceViewLabel)
displayableManager = sliceViewWidget.sliceView().displayableManagerByClassName(
  "vtkMRMLMarkupsDisplayableManager"
)
line = slicer.util.getNode('L')
lineDisplayNode = line.GetDisplayNode()
widget = displayableManager.GetWidget(lineDisplayNode)

widget.SetEventTranslationClickAndDrag(
  widget.WidgetStateOnWidget,
  vtk.vtkCommand.LeftButtonPressEvent,
  vtk.vtkEvent.NoModifier,
  widget.WidgetStateTranslate,
  vtk.vtkWidgetEvent.NoEvent,
  vtk.vtkWidgetEvent.NoEvent
)

widget.SetEventTranslationClickAndDrag(
  widget.WidgetStateOnWidget,
  vtk.vtkCommand.LeftButtonPressEvent,
  vtk.vtkEvent.NoModifier,
  widget.WidgetStateTranslate,
  widget.WidgetEventTranslateStart,
  widget.WidgetEventTranslateEnd
)

As part of improving functionality for the Slicer community, have you found that the existing events for a Markups line node not sufficient?

  • Mouse wheel click on line to translate entire line
  • Left click on control point to translate single point

I am making the application for doctors who do not have much professionalism in using a computer and it will be difficult for them to understand that the transfer of the entire line is assigned to the middle mouse button.

I wish to contribute these lines as a surgeon.

When your doctors have finished with your simplification, they would ask you for more simplifications. You will be caught up in an endless whirlwind, reinventing the wheel every time. I think IT pros and developers should rather show doctors how to use computers and software as they are. Lest in 50 years, doctors (in general) would remain at the same level of unfortunately ‘below base’ skill.

The recording of the problem is below - the entire line translating works by left mouse button pressing, but the point translating stopped working.
Animation