"use strict";

exports.__esModule = true;
exports["default"] = void 0;
var Viewport = exports["default"] = /*#__PURE__*/function () {
  function Viewport() {
    this.viewportElement = void 0;
  }
  var _proto = Viewport.prototype;
  _proto.mount = function mount(ele) {
    if (!ele || ele === this.viewportElement) {
      return;
    }
    this.viewportElement = ele;
  };
  _proto.toGlobalPoint = function toGlobalPoint(point) {
    if (!this.viewportElement) {
      return point;
    }
    var bound = this.viewportElement.getBoundingClientRect();
    return {
      clientX: bound.left + point.clientX,
      clientY: bound.top + point.clientY
    };
  };
  return Viewport;
}();