function getPointer(_ref2, endOnly) {
  var pageX = _ref2.pageX,
      pageY = _ref2.pageY;
  var end = {
    endX: pageX,
    endY: pageY
  };
  return endOnly ? end : _objectSpread2({
    startX: pageX,
    startY: pageY
  }, end);
}
Get a pointer from an event object.
@param {Object} event - The target event object.
@param {boolean} endOnly - Indicates if only returns the end point coordinate or not.
@returns {Object} The result pointer contains start and/or end point coordinates.