parsePoint method

Point<num>? parsePoint(
  1. Event e
)

Implementation

Point? parsePoint(Event e) {
  if (e is TouchEvent) {
    var p = e.changedTouches!.first.client;
    return Point(p.x - _img.offset.left, p.y - _img.offset.top);
  } else if (e is MouseEvent) {
    var p = e.page;
    return Point(p.x - _img.offset.left, p.y - _img.offset.top);
  }
  return null;
}