geoPath.js 1.3 KB

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