"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = _default;

/*
 * @Author: lianghaosen
 * @Date: 2018-12-01 10:31:27
 * @Last Modified by: lianghaosen
 * @Last Modified time: 2018-12-04 16:20:03
 */
function _default(container) {
  var containerOffset = container.getBoundingClientRect();
  var direction = ["top", "right", "bottom", "left"];
  var visibleArea = {};
  direction.forEach(function (d) {
    visibleArea[d] = containerOffset[d] > 0 ? containerOffset[d] : 0;
  });
  return visibleArea;
}