@idmwx/idmui-gl3 6.4.3 → 6.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5634,7 +5634,7 @@ const Oa = {
5634
5634
  </div>
5635
5635
  <div>
5636
5636
  <span>BF${((Be = (ke = b.properties) == null ? void 0 : ke.wind) == null ? void 0 : Be.bf) || "-"}</span> /
5637
- <span>${((ze = b.properties) == null ? void 0 : ze.pressure) || "-"} hPa${v}</span>
5637
+ <span>${((ze = b.properties) == null ? void 0 : ze.pressure) || "-"} hPa</span>
5638
5638
  </div>
5639
5639
  <div class="${q}"></div>
5640
5640
  `, this.labelMarkers.push(new Re.Marker(S).setLngLat(b.geometry.coordinates).setOffset(_e).addTo(this.map)), y = y + 1;
@@ -195,7 +195,7 @@
195
195
  </div>
196
196
  <div>
197
197
  <span>BF${((fe=(we=w.properties)==null?void 0:we.wind)==null?void 0:fe.bf)||"-"}</span> /
198
- <span>${((Le=w.properties)==null?void 0:Le.pressure)||"-"} hPa${A}</span>
198
+ <span>${((Le=w.properties)==null?void 0:Le.pressure)||"-"} hPa</span>
199
199
  </div>
200
200
  <div class="${Y}"></div>
201
201
  `,this.labelMarkers.push(new _e.Marker(N).setLngLat(w.geometry.coordinates).setOffset(ue).addTo(this.map)),g=g+1}})}else this.map.addLayer({id:this.pointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":12},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}});this.map.addLayer({id:this.historyPointCircleLayer+"-border",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","important",!0],["!=","disabled",!0]],paint:{"circle-radius":7,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointCircleLayer,type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","important",!0],["!=","disabled",!0]],paint:{"circle-radius":5,"circle-color":"rgba(0,0,0,0.7)"}}),this.map.addLayer({id:this.historyPointCircleLayer+"-inner",type:"circle",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","important",!0],["!=","disabled",!0]],paint:{"circle-radius":3,"circle-color":"#fff"}}),this.map.addLayer({id:this.historyPointLabelLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","history"],["==","important",!0],["!=","disabled",!0]],layout:{"text-field":["get","format"],"text-offset":[0,-.5],"text-anchor":"bottom-left","text-size":14},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"#fff","text-halo-width":1}}),this.map.addLayer({id:this.forecastNameLayer,type:"symbol",source:this.clusterSource,filter:["all",["==","$type","Point"],["==","type","forecast"],["==","important",!0]],layout:{"text-field":["get","name"],"text-offset":[0,1.5],"text-anchor":"bottom","text-size":16,"text-allow-overlap":!0,"text-ignore-placement":!0},paint:{"text-color":"#fff","text-halo-color":"#0033ff","text-halo-width":4}}),E=new Date().valueOf()-(B+u),console.log("[tropical] add elapsed: ",E,", total: ",u+=E)}}this.handleDrawCircle();const C=W.TropicalHelper.interpolate(this.tropicals,1);this.interpolateData=JSON.parse(JSON.stringify(C)),this.handleDateChange()}},findClosestToNumber(i,e,a){var s,n;if(!i.length)return null;let o=i[0],r=Math.abs(((s=o==null?void 0:o.properties)==null?void 0:s[e])-a);for(let l=1;l<i.length;l++){const h=i[l],d=Math.abs(Number((n=h==null?void 0:h.properties)==null?void 0:n.hour)-a);d<r&&(r=d,o=h)}return o},handleClear(){var i;this.map&&(this.map.getLayer(this.historyLayer)&&this.map.removeLayer(this.historyLayer),this.map.getLayer(this.forecastLayer)&&this.map.removeLayer(this.forecastLayer),this.map.getLayer(this.forecastModelLayer)&&this.map.removeLayer(this.forecastModelLayer),this.map.getLayer(this.forecastNameLayer)&&this.map.removeLayer(this.forecastNameLayer),this.map.getLayer(this.pointCircleLayer)&&this.map.removeLayer(this.pointCircleLayer),this.map.getLayer(this.pointCircleLayer+"-border")&&this.map.removeLayer(this.pointCircleLayer+"-border"),this.map.getLayer(this.pointLabelLayer)&&this.map.removeLayer(this.pointLabelLayer),this.map.getLayer(this.historyPointCircleLayer)&&this.map.removeLayer(this.historyPointCircleLayer),this.map.getLayer(this.historyPointCircleLayer+"-border")&&this.map.removeLayer(this.historyPointCircleLayer+"-border"),this.map.getLayer(this.historyPointCircleLayer+"-inner")&&this.map.removeLayer(this.historyPointCircleLayer+"-inner"),this.map.getLayer(this.historyPointLabelLayer)&&this.map.removeLayer(this.historyPointLabelLayer),this.map.getLayer(this.interpolateLineLayer)&&this.map.removeLayer(this.interpolateLineLayer),(i=this.interpolateMarkers)==null||i.forEach(e=>e==null?void 0:e.remove()),this.map.getSource(this.source)&&this.map.removeSource(this.source),this.map.getSource(this.clusterSource)&&this.map.removeSource(this.clusterSource),this.map.getSource(this.interpolateSource)&&this.map.removeSource(this.interpolateSource),this.map.getLayer(this.circleLayer)&&this.map.removeLayer(this.circleLayer),this.map.getSource(this.circleSource)&&this.map.removeSource(this.circleSource),this.labelMarkers.forEach(e=>e==null?void 0:e.remove()),this.labelMarkers=[])},handleDateChange(){var i,e,a,o,r,s,n,l,h,d,c,m,b,C,B,u,E,v,g,A,p,w,y,f,I,_,S,M,Q,V,H,ae;if((i=this.interpolateMarkers)==null||i.forEach(q=>q==null?void 0:q.remove()),this.circleSourceData.features=[],(e=this.interpolateData)!=null&&e.length&&this.tropicals.active){const q=j(this.date).utc().set({minute:0,second:0,millisecond:0}),ie=j.utc().add(1,"hour").set({minute:0,second:0,millisecond:0}),ce=q.isBefore(ie)&&ie.diff(q,"h")<2?ie.format():q.format(),re=this.interpolateData.filter(F=>F.properties.date===ce&&!F.properties.disabled),he=this.handleComputePolygons(re),oe=z.featureCollection([...re]);he.forEach(F=>{oe.features.push(F)}),(a=this.map)!=null&&a.getSource(this.interpolateSource)?(o=this.map)==null||o.getSource(this.interpolateSource).setData(oe):((r=this.map)==null||r.addSource(this.interpolateSource,{type:"geojson",data:oe}),(s=this.map)==null||s.addLayer({id:this.interpolateLineLayer,type:"line",source:this.interpolateSource,filter:["all",["==","$type","Polygon"],["!=","disabled",!0]],paint:{"line-opacity":1,"line-color":["match",["get","level"],7,"#ff9100",10,"#f44336","#ffffff"],"line-width":1}})),this.interpolateMarkers=[];for(const F of re)if(!F.properties.disabled){let K="#f44336";((l=(n=F.properties)==null?void 0:n.wind)==null?void 0:l.kts)<32||!((d=(h=F.properties)==null?void 0:h.wind)!=null&&d.kts)?K="#03f869":((m=(c=F.properties)==null?void 0:c.wind)==null?void 0:m.kts)>=32&&((C=(b=F.properties)==null?void 0:b.wind)==null?void 0:C.kts)<47?K="#f2f202":((u=(B=F.properties)==null?void 0:B.wind)==null?void 0:u.kts)>=47&&((v=(E=F.properties)==null?void 0:E.wind)==null?void 0:v.kts)<63?K="#ff9100":((A=(g=F.properties)==null?void 0:g.wind)==null?void 0:A.kts)>=63&&((w=(p=F.properties)==null?void 0:p.wind)==null?void 0:w.kts)<79?K="#f44336":((f=(y=F.properties)==null?void 0:y.wind)==null?void 0:f.kts)>=79&&((_=(I=F.properties)==null?void 0:I.wind)==null?void 0:_.kts)<94?K="#f903d0":((M=(S=F.properties)==null?void 0:S.wind)==null?void 0:M.kts)>=94?K="#8702f9":K="#f44336";const se=`<svg t="1719918955501"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idmwx/idmui-gl3",
3
3
  "private": false,
4
- "version": "6.4.3",
4
+ "version": "6.4.4",
5
5
  "description": "idm webgl3",
6
6
  "type": "module",
7
7
  "keywords": [