Skip to content

Cannot send "mouse move" with left/right down with EnableTestAssistant #460

@notmatthancock

Description

@notmatthancock

As far as I can tell, the EnableTestAssistant only provides methods for creating "drag over" DragEvents, but does not provide the ability to create a mouse-move MouseEvent with left_down attribute set to True.

This seems like a straight-forward extension of EnableTestAssistant.mouse_move to include left_down and right_down keyword arguments to be included in the mouse event that is created in body of the function:

enable/enable/testing.py

Lines 275 to 276 in 4db18d2

def mouse_move(self, interactor, x, y, window=None,
alt_down=False, control_down=False, shift_down=False):

This functionality would be useful because (for example) the DragTool depends on mouse move events where the event has {left,right}_down set to True:

def _drag_mouse_move(self, event):
state = self._drag_state
button_down = getattr(event, self.drag_button + "_down")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions