How to detect mouse movement over node while button is pressed?

前端 未结 2 707

Problem

You can add an event listener to a node which detects mouse movement over it. This doesn\'t work if a mouse button was pressed before you mo

2条回答
  •  误落风尘
    2021-01-02 11:31

    The (source) node which handles the initial DRAG_DETECTED event should invoke sourceNode.startFullDrag(), then the target node will able to handle one of MouseDragEvents, for instance MOUSE_DRAG_OVER or MOUSE_DRAG_ENTERED event with respective targetNode.setOn() method.

提交回复
热议问题