kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
118 lines (117 loc) • 13.2 kB
JavaScript
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _react = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _base = require("../base");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
var GridLayerIcon = exports["default"] = /*#__PURE__*/function (_Component) {
function GridLayerIcon() {
(0, _classCallCheck2["default"])(this, GridLayerIcon);
return _callSuper(this, GridLayerIcon, arguments);
}
(0, _inherits2["default"])(GridLayerIcon, _Component);
return (0, _createClass2["default"])(GridLayerIcon, [{
key: "render",
value: function render() {
return /*#__PURE__*/_react["default"].createElement(_base.Base, this.props, /*#__PURE__*/_react["default"].createElement("rect", {
x: "11.2",
y: "11.2",
className: "cr1",
width: "13.1",
height: "13.1",
style: {
opacity: 0.8
}
}), /*#__PURE__*/_react["default"].createElement("rect", {
x: "25.4",
y: "11.2",
className: "cr2",
width: "13.1",
height: "13.1",
style: {
opacity: 0.8
}
}), /*#__PURE__*/_react["default"].createElement("rect", {
x: "39.6",
y: "11.2",
width: "13.1",
height: "13.1",
className: "cr3"
}), /*#__PURE__*/_react["default"].createElement("rect", {
x: "11.2",
y: "25.4",
className: "cr4",
width: "13.1",
height: "13.1",
style: {
opacity: 0.4
}
}), /*#__PURE__*/_react["default"].createElement("rect", {
x: "25.4",
y: "25.4",
className: "cr5",
width: "13.1",
height: "13.1"
}), /*#__PURE__*/_react["default"].createElement("rect", {
x: "39.6",
y: "25.4",
className: "cr6",
width: "13.1",
height: "13.1",
style: {
opacity: 0.8
}
}), /*#__PURE__*/_react["default"].createElement("rect", {
x: "11.2",
y: "39.6",
width: "13.1",
className: "cr1",
height: "13.1"
}), /*#__PURE__*/_react["default"].createElement("rect", {
x: "25.4",
y: "39.6",
className: "cr2",
width: "13.1",
height: "13.1",
style: {
opacity: 0.4
}
}), /*#__PURE__*/_react["default"].createElement("rect", {
x: "39.6",
y: "39.6",
className: "cr3",
width: "13.1",
height: "13.1",
style: {
opacity: 0.4
}
}));
}
}]);
}(_react.Component);
(0, _defineProperty2["default"])(GridLayerIcon, "propTypes", {
/** Set the height of the icon, ex. '16px' */
height: _propTypes["default"].string,
colors: _propTypes["default"].arrayOf(_propTypes["default"].string)
});
(0, _defineProperty2["default"])(GridLayerIcon, "defaultProps", {
height: '16px',
predefinedClassName: 'grid-layer-icon',
totalColor: 6
});
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJfaW50ZXJvcFJlcXVpcmVXaWxkY2FyZCIsInJlcXVpcmUiLCJfcHJvcFR5cGVzIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsIl9iYXNlIiwiX2dldFJlcXVpcmVXaWxkY2FyZENhY2hlIiwiZSIsIldlYWtNYXAiLCJyIiwidCIsIl9fZXNNb2R1bGUiLCJfdHlwZW9mIiwiaGFzIiwiZ2V0IiwibiIsIl9fcHJvdG9fXyIsImEiLCJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImdldE93blByb3BlcnR5RGVzY3JpcHRvciIsInUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJpIiwic2V0IiwiX2NhbGxTdXBlciIsIm8iLCJfZ2V0UHJvdG90eXBlT2YyIiwiX3Bvc3NpYmxlQ29uc3RydWN0b3JSZXR1cm4yIiwiX2lzTmF0aXZlUmVmbGVjdENvbnN0cnVjdCIsIlJlZmxlY3QiLCJjb25zdHJ1Y3QiLCJjb25zdHJ1Y3RvciIsImFwcGx5IiwiQm9vbGVhbiIsInByb3RvdHlwZSIsInZhbHVlT2YiLCJHcmlkTGF5ZXJJY29uIiwiZXhwb3J0cyIsIl9Db21wb25lbnQiLCJfY2xhc3NDYWxsQ2hlY2syIiwiYXJndW1lbnRzIiwiX2luaGVyaXRzMiIsIl9jcmVhdGVDbGFzczIiLCJrZXkiLCJ2YWx1ZSIsInJlbmRlciIsImNyZWF0ZUVsZW1lbnQiLCJCYXNlIiwicHJvcHMiLCJ4IiwieSIsImNsYXNzTmFtZSIsIndpZHR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