"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.registerEventLayer = exports.registerEventGeometry = void 0;
var EVENT = ['onClick', 'onDoubleClick', 'onMouseEnter', 'onMouseMove', 'onMouseLeave'];

// 注册鼠标事件
var registerEventGeometry = function registerEventGeometry(layer, props) {
  EVENT.map(function (v) {
    layer[v] = function () {
      if (layer.getProperties) {
        var options = layer.getProperties();
        props[v] && props[v](options);
      }
    };
  });
};
exports.registerEventGeometry = registerEventGeometry;
var registerEventLayer = function registerEventLayer(layer, props) {
  EVENT.map(function (v) {
    layer[v] = function (e) {
      props[v] && props[v](e);
    };
  });
};
exports.registerEventLayer = registerEventLayer;
//# sourceMappingURL=index.js.map
