geoPath.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. "use strict";
  2. var __rest = (this && this.__rest) || function (s, e) {
  3. var t = {};
  4. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  5. t[p] = s[p];
  6. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  7. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  8. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  9. t[p[i]] = s[p[i]];
  10. }
  11. return t;
  12. };
  13. Object.defineProperty(exports, "__esModule", { value: true });
  14. exports.GeoPath = void 0;
  15. /**
  16. * Wrap GeoPath by a GeoView.
  17. */
  18. const GeoPath = () => {
  19. return (options) => {
  20. const { type, data, scale, encode, style, animate, key, state } = options, rest = __rest(options, ["type", "data", "scale", "encode", "style", "animate", "key", "state"]);
  21. return [
  22. Object.assign(Object.assign({ type: 'geoView' }, rest), { children: [
  23. {
  24. type: 'geoPath',
  25. key: `${key}-0`,
  26. data: {
  27. value: data,
  28. },
  29. scale,
  30. encode,
  31. style,
  32. animate,
  33. state,
  34. },
  35. ] }),
  36. ];
  37. };
  38. };
  39. exports.GeoPath = GeoPath;
  40. exports.GeoPath.props = {};
  41. //# sourceMappingURL=geoPath.js.map