You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
1.2 KiB
JavaScript

(self.webpackChunk=self.webpackChunk||[]).push([[1166],{41472:function(e,n,t){var r=t(81433);e.exports=function(e,n){Array.isArray(n)||(n=[]),e.length>0&&n.push(r([0,0],e[0]));for(var t=0;t<e.length-1;t++){var o=e[t],a=e[t+1],u=o[0],s=o[1],c=a[0],i=a[1],h=[.75*u+.25*c,.75*s+.25*i],f=[.25*u+.75*c,.25*s+.75*i];n.push(h),n.push(f)}return e.length>1&&n.push(r([0,0],e[e.length-1])),n}},81433:function(e){e.exports=function(e,n){return e[0]=n[0],e[1]=n[1],e}},67548:function(e,n,t){"use strict";var r=t(61038),o=t(41376),a=t(54354),u=t(95783),s=t(79847),c=t(42010),i=t(41372),h=t(41472);var f=new u.Z({}),p=new o.Z({layers:[new c.Z({source:new s.Z,opacity:.5}),new i.Z({source:f})],target:"map",view:new a.ZP({center:[1078373.595,6871994.591],zoom:5})}),l=document.getElementById("shall-smoothen"),d=document.getElementById("iterations"),w=new r.ZP({source:f,type:"LineString"});p.addInteraction(w),w.on("drawend",(function(e){if(l.checked){var n=e.feature.getGeometry(),t=function(e,n){for(n=Math.min(Math.max(n,1),10);n>0;)e=h(e),n--;return e}(n.getCoordinates(),parseInt(d.value,10)||5);n.setCoordinates(t)}}))}},function(e){var n=function(n){return e(e.s=n)};n(9877),n(67548)}]);
//# sourceMappingURL=chaikin.js.map