Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function ElementBasedDeviceDedector(props) {
var _this;
_classCallCheck(this, ElementBasedDeviceDedector);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ElementBasedDeviceDedector).call(this, props));
_this.onResize = function (width) {
_this.dedectDeviceType(width);
};
_this.dedectDeviceType = function (width) {
var _this$props = _this.props,
onChangeType = _this$props.onChangeType,
_devices = _this$props.devices; // sort descending devices by breakpoint px
var devices = _devices.sort(function (device1, device2) {
return device1.breakpointPx > device2.breakpointPx ? -1 : device1.breakpointPx === device2.breakpointPx ? 0 : 1;
}); // compare
for (var i = 0; i < devices.length; i += 1) {
value: function componentWillUnmount() {
if (_get(_getPrototypeOf(OverridedCluster.prototype), "componentWillUnmount", this)) {
_get(_getPrototypeOf(OverridedCluster.prototype), "componentWillUnmount", this).call(this);
}
var map = this.props.map;
if (!map) {
return;
}
map.off("zoom", this.mapChange);
}
}, {
function Grid() {
_classCallCheck(this, Grid);
return _possibleConstructorReturn(this, _getPrototypeOf(Grid).apply(this, arguments));
}
function ZoomableComponent() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, ZoomableComponent);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ZoomableComponent)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.onClusterClick = function (properties, lngLat, event, meta) {
var onClusterClick = _this.props.onClusterClick;
var map = _this.getMapInstance();
var currentZoom = map.getZoom();
var maxZoom = map.getMaxZoom();
var zoom = calculateNextZoomLevel(currentZoom, maxZoom);
map.flyTo({
center: lngLat,
zoom: zoom
});
_this._handleClick(properties, lngLat, event, meta, onClusterClick);
};
function ConnectedWithSpiderifierComponent(props) {
var _this;
_classCallCheck(this, ConnectedWithSpiderifierComponent);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ConnectedWithSpiderifierComponent).call(this, props));
_this.onClickOverlappedPoints = function (points, coordinates) {
_this._updateSpiderifierProps([points], coordinates);
};
_this.onMapChange = function () {
var onlySpiderifier = _this.props.onlySpiderifier;
if (!onlySpiderifier && _.isArray(_this._spiderifieredLocations)) {
var _this$props = _this.props,
data = _this$props.data,
radius = _this$props.radius;
var map = _this.getMapInstance();
_this._spiderifieredLocations.forEach(function (lngLat) {
function ClusterLayer() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, ClusterLayer);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ClusterLayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this._clusterMarkerFactory = function (coordinates, pointCount, getLeaves) {
var clusterClassName = _this.props.clusterClassName;
var className = classnames('cluster-layer--cluster', clusterClassName);
var points = getLeaves();
var pointsProps = _this._getPointsProps(points);
var clusterEventHandlers = extractEventHandlers(_this.props, /^onCluster(.+)$/i);
return React.createElement(MarkerLayer, Object.assign({
key: coordinates.toString(),
coordinates: coordinates,
className: "cluster-layer-container",
properties: pointsProps
}, clusterEventHandlers), React.createElement("div", {
className: className
function LayerWithOverlappedPointComponent() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, LayerWithOverlappedPointComponent);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(LayerWithOverlappedPointComponent)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this.onClick = function (properties, lngLat, event, meta) {
var onClick = _this.props.onClick;
_this._handleClick(properties, lngLat, event, meta, onClick);
};
_this.onClusterClick = function (properties, lngLat, event, meta) {
var onClusterClick = _this.props.onClusterClick;
_this._handleClick(properties, lngLat, event, meta, onClusterClick);
};
return _this;
}
function MarkerLayer() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, MarkerLayer);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(MarkerLayer)).call.apply(_getPrototypeOf2, [this].concat(args)));
_this._disableMapDragPan = function () {
var map = _this.getMapInstance();
if (map) {
map.dragPan.disable();
}
};
_this._enableMapDragPan = function () {
var map = _this.getMapInstance();
if (map) {
map.dragPan.enable();
}
};
function MappedComponent() {
_classCallCheck(this, MappedComponent);
return _possibleConstructorReturn(this, _getPrototypeOf(MappedComponent).apply(this, arguments));
}
function Icon() {
var _getPrototypeOf2;
var _this;
_classCallCheck(this, Icon);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Icon)).call.apply(_getPrototypeOf2, [this].concat(args)));
_defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "renderSvgPaths", function (type) {
var pathStrings = svgPaths[type];
if (pathStrings == null) {
return null;
}
return pathStrings.map(function (d, i) {
return React.createElement("path", {
key: i,
d: d,
fillRule: "evenodd"
});
});
});