google-map-react
Version:
isomorphic google map react component, allows render react components on the google map
49 lines (32 loc) • 2.05 kB
JavaScript
;
exports.__esModule = true;
var _eventemitter = require('eventemitter3');
var _eventemitter2 = _interopRequireDefault(_eventemitter);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var MarkerDispatcher = function (_EventEmitter) {
_inherits(MarkerDispatcher, _EventEmitter);
function MarkerDispatcher(gmapInstance) {
_classCallCheck(this, MarkerDispatcher);
var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));
_this.gmapInstance = gmapInstance;
return _this;
}
MarkerDispatcher.prototype.getChildren = function getChildren() {
return this.gmapInstance.props.children;
};
MarkerDispatcher.prototype.getMousePosition = function getMousePosition() {
return this.gmapInstance.mouse_;
};
MarkerDispatcher.prototype.getUpdateCounter = function getUpdateCounter() {
return this.gmapInstance.updateCounter_;
};
MarkerDispatcher.prototype.dispose = function dispose() {
this.gmapInstance = null;
this.removeAllListeners();
};
return MarkerDispatcher;
}(_eventemitter2.default);
exports.default = MarkerDispatcher;