runbir-tools 1.0.16 → 1.0.17

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.
@@ -1,4 +1,4 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map[data-v-92595ad3]{width:100%;height:100%}@keyframes rotate-92595ad3{0%{transform:rotate(0)}to{transform:rotate(360deg)}}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".map[data-v-158c1875]{width:100%;height:100%}@keyframes rotate-158c1875{0%{transform:rotate(0)}to{transform:rotate(360deg)}}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  var ze = Object.defineProperty;
3
3
  var Ve = (s, e, t) => e in s ? ze(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
4
4
  var se = (s, e, t) => Ve(s, typeof e != "symbol" ? e + "" : e, t);
@@ -24253,6 +24253,21 @@ const _hoisted_1 = {
24253
24253
  "url"
24254
24254
  ]);
24255
24255
  }, updateImageStaticLayer = (s, e, t) => {
24256
+ if (Object.prototype.hasOwnProperty.call(e.source ?? {}, "url")) {
24257
+ const r = props.options.layers.find((o) => o.id === t);
24258
+ if (!e.source.url) {
24259
+ s.setSource(null);
24260
+ return;
24261
+ }
24262
+ if (r != null && r.useInterimTilesWhenMissing) {
24263
+ s.setSource(null), s.setSource(getSource(r));
24264
+ return;
24265
+ }
24266
+ if (!s.getSource()) {
24267
+ r && s.setSource(getSource(r));
24268
+ return;
24269
+ }
24270
+ }
24256
24271
  updated(s, e, t, [
24257
24272
  "extent",
24258
24273
  "map",
@@ -24265,7 +24280,7 @@ const _hoisted_1 = {
24265
24280
  "source",
24266
24281
  "visible",
24267
24282
  "zIndex"
24268
- ], ["attributions", "properties"]);
24283
+ ], ["attributions", "properties", "url"]);
24269
24284
  }, updatePointLayer = (layer, info) => {
24270
24285
  const layerEffectiveFields = [
24271
24286
  "declutter",
@@ -24337,7 +24352,7 @@ const _hoisted_1 = {
24337
24352
  for (const key in info)
24338
24353
  if (key === "source") {
24339
24354
  const keys = Object.keys(info.source), flag = keys.every((s) => sourceEffectiveFields.includes(s));
24340
- if (flag)
24355
+ if (console.log(keys, sourceEffectiveFields, sourceEffectiveFields.includes("url")), flag)
24341
24356
  for (const k in info.source)
24342
24357
  eval(`layer.getSource().set${capitalize(k)}(info.source[k])`);
24343
24358
  else {
@@ -24443,8 +24458,22 @@ const _hoisted_1 = {
24443
24458
  }, r.src = i;
24444
24459
  }), new XYZ(e);
24445
24460
  }
24446
- case "imageStatic":
24447
- return new Static({ ...s.source });
24461
+ case "imageStatic": {
24462
+ const e = { ...s.source };
24463
+ return s.useInterimTilesWhenMissing && (e.imageLoadFunction = (t, i) => {
24464
+ const n = t.getImage();
24465
+ if (!i) {
24466
+ n.src = transparentTile;
24467
+ return;
24468
+ }
24469
+ const r = document.createElement("img");
24470
+ e.crossOrigin !== void 0 && (r.crossOrigin = e.crossOrigin), r.onload = () => {
24471
+ n.src = i;
24472
+ }, r.onerror = () => {
24473
+ n.src = transparentTile;
24474
+ }, r.src = i;
24475
+ }), new Static(e);
24476
+ }
24448
24477
  case "point":
24449
24478
  return getPointSource(s);
24450
24479
  default:
@@ -24661,7 +24690,7 @@ const _hoisted_1 = {
24661
24690
  for (const [i, n] of e)
24662
24691
  t[i] = n;
24663
24692
  return t;
24664
- }, VueOl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-92595ad3"]]), plugin = {
24693
+ }, VueOl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-158c1875"]]), plugin = {
24665
24694
  install(s) {
24666
24695
  s.component("VueOl", VueOl);
24667
24696
  }