MCPcopy Create free account
hub / github.com/alignoth/alignoth / Vt

Function Vt

resources/vega.min.js:762–835  ·  view source on GitHub ↗
(t, e)

Source from the content-addressed store, hash-verified

760 : { type: "Feature", id: n, bbox: r, properties: i, geometry: o };
761 }
762 function Vt(t, e) {
763 var n = (function (t) {
764 if (null == t) return Ht;
765 var e,
766 n,
767 r = t.scale[0],
768 i = t.scale[1],
769 o = t.translate[0],
770 a = t.translate[1];
771 return function (t, s) {
772 s || (e = n = 0);
773 var u = 2,
774 l = t.length,
775 c = new Array(l);
776 for (c[0] = (e += t[0]) * r + o, c[1] = (n += t[1]) * i + a; u < l; )
777 ((c[u] = t[u]), ++u);
778 return c;
779 };
780 })(t.transform),
781 r = t.arcs;
782 function i(t, e) {
783 e.length && e.pop();
784 for (var i = r[t < 0 ? ~t : t], o = 0, a = i.length; o < a; ++o)
785 e.push(n(i[o], o));
786 t < 0 &&
787 (function (t, e) {
788 for (var n, r = t.length, i = r - e; i < --r; )
789 ((n = t[i]), (t[i++] = t[r]), (t[r] = n));
790 })(e, a);
791 }
792 function o(t) {
793 return n(t);
794 }
795 function a(t) {
796 for (var e = [], n = 0, r = t.length; n < r; ++n) i(t[n], e);
797 return (e.length < 2 && e.push(e[0]), e);
798 }
799 function s(t) {
800 for (var e = a(t); e.length < 4; ) e.push(e[0]);
801 return e;
802 }
803 function u(t) {
804 return t.map(s);
805 }
806 return (function t(e) {
807 var n,
808 r = e.type;
809 switch (r) {
810 case "GeometryCollection":
811 return { type: r, geometries: e.geometries.map(t) };
812 case "Point":
813 n = o(e.coordinates);
814 break;
815 case "MultiPoint":
816 n = e.coordinates.map(o);
817 break;
818 case "LineString":
819 n = a(e.arcs);

Callers 2

GtFunction · 0.70
JtFunction · 0.70

Calls 4

oFunction · 0.70
aFunction · 0.70
uFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected