redirectOnTouchMoveToMouseEvent function

void redirectOnTouchMoveToMouseEvent(
  1. Element element
)

Redirects element.onTouchMove to element.onMouseMove as MouseEvent.

Implementation

void redirectOnTouchMoveToMouseEvent(Element element) {
  element.onTouchMove.listen((event) {
    var mouseEvent = touchEventToMouseEvent(event);
    if (mouseEvent != null) {
      element.dispatchEvent(mouseEvent);
    }
  });
}