@datagouv/components-next 1.0.0 → 1.0.2-dev.0
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/assets/main.css +0 -28
- package/dist/{Control-BNCDn-8E.js → Control-DuZJdKV_.js} +1 -1
- package/dist/{Datafair.client-Dls5AHTE.js → Datafair.client-DpeBuzZZ.js} +2 -2
- package/dist/{Event-BOgJUhNR.js → Event--kp8kMdJ.js} +21 -21
- package/dist/{Image-BN-4XkIn.js → Image-34hvypZI.js} +114 -58
- package/dist/{JsonPreview.client-DPDTs433.js → JsonPreview.client-B3sQR-rW.js} +16 -16
- package/dist/{Map-BdT3i2C4.js → Map-BjUnLyj8.js} +1534 -1466
- package/dist/{MapContainer.client-BdAzd7bj.js → MapContainer.client-BA6GCqKX.js} +8 -8
- package/dist/{OSM-CamriM9b.js → OSM-s40W6sQ2.js} +22 -12
- package/dist/PdfPreview.client-CbeSChb8.js +14513 -0
- package/dist/Pmtiles.client-D8pFim1L.js +25190 -0
- package/dist/{ScaleLine-BiesrgOv.js → ScaleLine-KW-nXqp3.js} +2 -2
- package/dist/Swagger.client-B-2Q16qa.js +4 -0
- package/dist/{Tile-DCuqwNOI.js → Tile-DbNFNPfU.js} +189 -172
- package/dist/{TileImage-CmZf8EdU.js → TileImage-BsXBxMtq.js} +132 -102
- package/dist/{View-DcDc7N2K.js → View-BR92hTWP.js} +8 -8
- package/dist/{XmlPreview.client-C0OgBkSq.js → XmlPreview.client-DWJt61wG.js} +15 -15
- package/dist/{common-C4rDcQpp.js → common-PJfpC179.js} +34 -33
- package/dist/components-next.css +4 -4
- package/dist/components-next.js +130 -125
- package/dist/components.css +2 -2
- package/dist/{index-BRGqW8aQ.js → index-DVp7Y0Xu.js} +11105 -6743
- package/dist/{main-CNHxAJ8J.js → main-CrSRA2X-.js} +25208 -25053
- package/dist/{proj-CKwYjU38.js → proj-DsetBcW7.js} +513 -498
- package/dist/{tilecoord-YW3qEH_j.js → tilecoord-Db24Px13.js} +242 -224
- package/dist/{vue3-xml-viewer.common-CmAdQfIy.js → vue3-xml-viewer.common-BjA4LdSC.js} +1 -1
- package/package.json +3 -2
- package/src/components/DataserviceCard.vue +3 -3
- package/src/components/DatasetCard.vue +2 -2
- package/src/components/DatasetQuality.vue +23 -16
- package/src/components/DatasetQualityInline.vue +13 -17
- package/src/components/DatasetQualityScore.vue +12 -15
- package/src/components/DiscussionMessageCard.vue +1 -1
- package/src/components/ObjectCard.vue +2 -2
- package/src/components/ObjectCardHeader.vue +1 -1
- package/src/components/OrganizationHorizontalCard.vue +87 -0
- package/src/components/OrganizationNameWithCertificate.vue +1 -1
- package/src/components/ProgressBar.vue +31 -0
- package/src/components/ResourceAccordion/Datafair.client.vue +1 -1
- package/src/components/ResourceAccordion/JsonPreview.client.vue +3 -3
- package/src/components/ResourceAccordion/MapContainer.client.vue +1 -1
- package/src/components/ResourceAccordion/PdfPreview.client.vue +70 -74
- package/src/components/ResourceAccordion/Pmtiles.client.vue +1 -1
- package/src/components/ResourceAccordion/Preview.vue +1 -1
- package/src/components/ResourceAccordion/ResourceAccordion.vue +5 -8
- package/src/components/ResourceAccordion/XmlPreview.client.vue +3 -3
- package/src/components/ReuseHorizontalCard.vue +1 -1
- package/src/components/Search/Filter/ProducerTypeFilter.vue +13 -3
- package/src/components/Search/GlobalSearch.vue +124 -28
- package/src/components/Toggletip.vue +5 -2
- package/src/components/TopicCard.vue +1 -1
- package/src/composables/useHasTabularData.ts +15 -0
- package/src/composables/useResourceCapabilities.ts +3 -4
- package/src/composables/useTranslation.ts +2 -1
- package/src/functions/api.types.ts +1 -1
- package/src/main.ts +8 -1
- package/src/types/search.ts +29 -1
- package/dist/PdfPreview.client-CopqSDyt.js +0 -107
- package/dist/Pmtiles.client-mF6xaOO_.js +0 -22812
- package/dist/Swagger.client-eJ7gpfZA.js +0 -4
- package/dist/pdf-vue3-IkJO65RH.js +0 -273
- package/dist/pdf.min-f72cfa08-CdgJTooZ.js +0 -9501
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { T as
|
|
2
|
-
import { T,
|
|
3
|
-
import { aF as
|
|
4
|
-
import { a as
|
|
5
|
-
import { a as xe, R as
|
|
6
|
-
function le(
|
|
7
|
-
return
|
|
1
|
+
import { T as Oe, b as Pe, d as ye, g as ee, I as Ke, R as Me } from "./tilecoord-Db24Px13.js";
|
|
2
|
+
import { T, h as Te, d as F, l as ze, j as Ae, W as be, c as me, t as Fe } from "./Image-34hvypZI.js";
|
|
3
|
+
import { aF as je, aH as ke, al as te, E as Ne, $ as Ze, an as we, aI as Ue, az as qe, aJ as Ge, L as Be, F as Ve, n as We, e as He, X as Xe, a as j, aK as Ye, j as re, d as oe, a2 as $e, i as Qe, H as Je } from "./proj-DsetBcW7.js";
|
|
4
|
+
import { a as ne, e as ie, p as et, g as v, d as ae, n as tt, q as nt } from "./common-PJfpC179.js";
|
|
5
|
+
import { a as xe, R as it, E as X, L as st } from "./Event--kp8kMdJ.js";
|
|
6
|
+
function le(u) {
|
|
7
|
+
return u instanceof Image || u instanceof HTMLCanvasElement || u instanceof HTMLVideoElement || u instanceof ImageBitmap ? u : null;
|
|
8
8
|
}
|
|
9
|
-
const
|
|
10
|
-
class Re extends
|
|
9
|
+
const rt = new Error("disposed"), ot = [256, 256];
|
|
10
|
+
class Re extends Oe {
|
|
11
11
|
/**
|
|
12
12
|
* @param {Options} options Tile options.
|
|
13
13
|
*/
|
|
@@ -26,7 +26,7 @@ class Re extends De {
|
|
|
26
26
|
if (this.size_)
|
|
27
27
|
return this.size_;
|
|
28
28
|
const e = le(this.data_);
|
|
29
|
-
return e ? [e.width, e.height] :
|
|
29
|
+
return e ? [e.width, e.height] : ot;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Get the data for the tile.
|
|
@@ -65,10 +65,10 @@ class Re extends De {
|
|
|
65
65
|
* @override
|
|
66
66
|
*/
|
|
67
67
|
disposeInternal() {
|
|
68
|
-
this.controller_ && (this.controller_.abort(
|
|
68
|
+
this.controller_ && (this.controller_.abort(rt), this.controller_ = null), super.disposeInternal();
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
class
|
|
71
|
+
class Ce {
|
|
72
72
|
/**
|
|
73
73
|
* @param {number} [highWaterMark] High water mark.
|
|
74
74
|
*/
|
|
@@ -77,7 +77,7 @@ class it {
|
|
|
77
77
|
}
|
|
78
78
|
deleteOldest() {
|
|
79
79
|
const e = this.pop();
|
|
80
|
-
e instanceof
|
|
80
|
+
e instanceof je && e.dispose();
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* @return {boolean} Can expire cache.
|
|
@@ -126,7 +126,7 @@ class it {
|
|
|
126
126
|
*/
|
|
127
127
|
get(e, t) {
|
|
128
128
|
const n = this.entries_[e];
|
|
129
|
-
return
|
|
129
|
+
return ne(
|
|
130
130
|
n !== void 0,
|
|
131
131
|
"Tried to get a value for a key that does not exist in the cache"
|
|
132
132
|
), n === this.newest_ || (n === this.oldest_ ? (this.oldest_ = /** @type {Entry} */
|
|
@@ -139,7 +139,7 @@ class it {
|
|
|
139
139
|
*/
|
|
140
140
|
remove(e) {
|
|
141
141
|
const t = this.entries_[e];
|
|
142
|
-
return
|
|
142
|
+
return ne(
|
|
143
143
|
t !== void 0,
|
|
144
144
|
"Tried to get a value for a key that does not exist in the cache"
|
|
145
145
|
), t === this.newest_ ? (this.newest_ = /** @type {Entry} */
|
|
@@ -219,7 +219,7 @@ class it {
|
|
|
219
219
|
* @param {T} value Value.
|
|
220
220
|
*/
|
|
221
221
|
set(e, t) {
|
|
222
|
-
|
|
222
|
+
ne(
|
|
223
223
|
!(e in this.entries_),
|
|
224
224
|
"Tried to set a value for a key that is used already"
|
|
225
225
|
);
|
|
@@ -240,7 +240,7 @@ class it {
|
|
|
240
240
|
this.highWaterMark = e;
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
class
|
|
243
|
+
class at {
|
|
244
244
|
constructor() {
|
|
245
245
|
this.instructions_ = [], this.zIndex = 0, this.offset_ = 0, this.context_ = /** @type {ZIndexContextProxy} */
|
|
246
246
|
new Proxy(Te(), {
|
|
@@ -284,7 +284,7 @@ class st {
|
|
|
284
284
|
return this.context_;
|
|
285
285
|
}
|
|
286
286
|
/**
|
|
287
|
-
* @param {CanvasRenderingContext2D} context Context.
|
|
287
|
+
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.
|
|
288
288
|
*/
|
|
289
289
|
draw(e) {
|
|
290
290
|
this.instructions_.forEach((t) => {
|
|
@@ -319,13 +319,13 @@ class st {
|
|
|
319
319
|
this.offset_ = this.instructions_.length, this.zIndex = 0;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
|
-
const
|
|
323
|
-
class
|
|
322
|
+
const lt = 5;
|
|
323
|
+
class ct extends ke {
|
|
324
324
|
/**
|
|
325
325
|
* @param {LayerType} layer Layer.
|
|
326
326
|
*/
|
|
327
327
|
constructor(e) {
|
|
328
|
-
super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = e, this.staleKeys_ = new Array(), this.maxStaleKeys =
|
|
328
|
+
super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = e, this.staleKeys_ = new Array(), this.maxStaleKeys = lt;
|
|
329
329
|
}
|
|
330
330
|
/**
|
|
331
331
|
* @return {Array<string>} Get the list of stale keys.
|
|
@@ -346,7 +346,7 @@ class ot extends Ae {
|
|
|
346
346
|
* an array of features.
|
|
347
347
|
*/
|
|
348
348
|
getFeatures(e) {
|
|
349
|
-
return
|
|
349
|
+
return te();
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* @param {import("../pixel.js").Pixel} pixel Pixel.
|
|
@@ -362,7 +362,7 @@ class ot extends Ae {
|
|
|
362
362
|
* @return {boolean} Layer is ready to be rendered.
|
|
363
363
|
*/
|
|
364
364
|
prepareFrame(e) {
|
|
365
|
-
return
|
|
365
|
+
return te();
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
368
368
|
* Render the layer.
|
|
@@ -372,7 +372,7 @@ class ot extends Ae {
|
|
|
372
372
|
* @return {HTMLElement} The rendered element.
|
|
373
373
|
*/
|
|
374
374
|
renderFrame(e, t) {
|
|
375
|
-
return
|
|
375
|
+
return te();
|
|
376
376
|
}
|
|
377
377
|
/**
|
|
378
378
|
* @abstract
|
|
@@ -408,7 +408,7 @@ class ot extends Ae {
|
|
|
408
408
|
/** @type {import("../Image.js").default} */
|
|
409
409
|
e.target
|
|
410
410
|
);
|
|
411
|
-
(t.getState() ===
|
|
411
|
+
(t.getState() === F.LOADED || t.getState() === F.ERROR) && this.renderIfReadyAndVisible();
|
|
412
412
|
}
|
|
413
413
|
/**
|
|
414
414
|
* Load the image if not already loaded, and register the image change
|
|
@@ -419,7 +419,7 @@ class ot extends Ae {
|
|
|
419
419
|
*/
|
|
420
420
|
loadImage(e) {
|
|
421
421
|
let t = e.getState();
|
|
422
|
-
return t !=
|
|
422
|
+
return t != F.LOADED && t != F.ERROR && e.addEventListener(Ne.CHANGE, this.boundHandleImageChange_), t == F.IDLE && (e.load(), t = e.getState()), t == F.LOADED;
|
|
423
423
|
}
|
|
424
424
|
/**
|
|
425
425
|
* @protected
|
|
@@ -441,19 +441,19 @@ class ot extends Ae {
|
|
|
441
441
|
delete this.layer_, super.disposeInternal();
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
const
|
|
445
|
-
let
|
|
446
|
-
function
|
|
447
|
-
|
|
444
|
+
const Ct = [];
|
|
445
|
+
let k = null;
|
|
446
|
+
function ht() {
|
|
447
|
+
k = me(1, 1, void 0, {
|
|
448
448
|
willReadFrequently: !0
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
|
-
class
|
|
451
|
+
class dt extends ct {
|
|
452
452
|
/**
|
|
453
453
|
* @param {LayerType} layer Layer.
|
|
454
454
|
*/
|
|
455
455
|
constructor(e) {
|
|
456
|
-
super(e), this.container = null, this.renderedResolution, this.tempTransform =
|
|
456
|
+
super(e), this.container = null, this.renderedResolution, this.tempTransform = ie(), this.pixelTransform = ie(), this.inversePixelTransform = ie(), this.context = null, this.deferredContext_ = null, this.containerReused = !1, this.frameState = null;
|
|
457
457
|
}
|
|
458
458
|
/**
|
|
459
459
|
* @param {import('../../DataTile.js').ImageLike} image Image.
|
|
@@ -462,12 +462,12 @@ class lt extends ot {
|
|
|
462
462
|
* @return {Uint8ClampedArray|null} The image data.
|
|
463
463
|
*/
|
|
464
464
|
getImageData(e, t, n) {
|
|
465
|
-
|
|
465
|
+
k || ht(), k.clearRect(0, 0, 1, 1);
|
|
466
466
|
let i;
|
|
467
467
|
try {
|
|
468
|
-
|
|
468
|
+
k.drawImage(e, t, n, 1, 1, 0, 0, 1, 1), i = k.getImageData(0, 0, 1, 1).data;
|
|
469
469
|
} catch {
|
|
470
|
-
return
|
|
470
|
+
return k = null, null;
|
|
471
471
|
}
|
|
472
472
|
return i;
|
|
473
473
|
}
|
|
@@ -488,30 +488,33 @@ class lt extends ot {
|
|
|
488
488
|
useContainer(e, t, n) {
|
|
489
489
|
const i = this.getLayer().getClassName();
|
|
490
490
|
let r, a;
|
|
491
|
-
if (e && e.className === i && (!n || e && e.style.backgroundColor &&
|
|
491
|
+
if (e && e.className === i && (!n || e && e.style.backgroundColor && Ze(
|
|
492
492
|
xe(e.style.backgroundColor),
|
|
493
493
|
xe(n)
|
|
494
494
|
))) {
|
|
495
495
|
const s = e.firstElementChild;
|
|
496
|
-
s
|
|
496
|
+
ze(s) && (a = s.getContext("2d"));
|
|
497
497
|
}
|
|
498
|
-
if (a &&
|
|
499
|
-
r = document.createElement("div"), r.className = i;
|
|
498
|
+
if (a && et(a.canvas.style.transform, t) ? (this.container = e, this.context = a, this.containerReused = !0) : this.containerReused ? (this.container = null, this.context = null, this.containerReused = !1) : this.container && (this.container.style.backgroundColor = null), !this.container) {
|
|
499
|
+
r = be ? Ae() : document.createElement("div"), r.className = i;
|
|
500
500
|
let s = r.style;
|
|
501
|
-
s.position = "absolute", s.width = "100%", s.height = "100%", a =
|
|
502
|
-
const l =
|
|
501
|
+
s.position = "absolute", s.width = "100%", s.height = "100%", a = me();
|
|
502
|
+
const l = (
|
|
503
|
+
/** @type {HTMLCanvasElement} */
|
|
504
|
+
a.canvas
|
|
505
|
+
);
|
|
503
506
|
r.appendChild(l), s = l.style, s.position = "absolute", s.left = "0", s.transformOrigin = "top left", this.container = r, this.context = a;
|
|
504
507
|
}
|
|
505
508
|
!this.containerReused && n && !this.container.style.backgroundColor && (this.container.style.backgroundColor = n);
|
|
506
509
|
}
|
|
507
510
|
/**
|
|
508
|
-
* @param {CanvasRenderingContext2D} context Context.
|
|
511
|
+
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.
|
|
509
512
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
|
510
513
|
* @param {import("../../extent.js").Extent} extent Clip extent.
|
|
511
514
|
* @protected
|
|
512
515
|
*/
|
|
513
516
|
clipUnrotated(e, t, n) {
|
|
514
|
-
const i =
|
|
517
|
+
const i = we(n), r = Ue(n), a = qe(n), s = Ge(n);
|
|
515
518
|
v(t.coordinateToPixelTransform, i), v(t.coordinateToPixelTransform, r), v(t.coordinateToPixelTransform, a), v(t.coordinateToPixelTransform, s);
|
|
516
519
|
const l = this.inversePixelTransform;
|
|
517
520
|
v(l, i), v(l, r), v(l, a), v(l, s), e.save(), e.beginPath(), e.moveTo(Math.round(i[0]), Math.round(i[1])), e.lineTo(Math.round(r[0]), Math.round(r[1])), e.lineTo(Math.round(a[0]), Math.round(a[1])), e.lineTo(Math.round(s[0]), Math.round(s[1])), e.clip();
|
|
@@ -522,7 +525,7 @@ class lt extends ot {
|
|
|
522
525
|
* @protected
|
|
523
526
|
*/
|
|
524
527
|
prepareContainer(e, t) {
|
|
525
|
-
const n = e.extent, i = e.viewState.resolution, r = e.viewState.rotation, a = e.pixelRatio, s = Math.round(
|
|
528
|
+
const n = e.extent, i = e.viewState.resolution, r = e.viewState.rotation, a = e.pixelRatio, s = Math.round(Be(n) / i * a), l = Math.round(Ve(n) / i * a);
|
|
526
529
|
ae(
|
|
527
530
|
this.pixelTransform,
|
|
528
531
|
e.size[0] / 2,
|
|
@@ -532,23 +535,24 @@ class lt extends ot {
|
|
|
532
535
|
r,
|
|
533
536
|
-s / 2,
|
|
534
537
|
-l / 2
|
|
535
|
-
),
|
|
536
|
-
const c =
|
|
538
|
+
), tt(this.inversePixelTransform, this.pixelTransform);
|
|
539
|
+
const c = nt(this.pixelTransform);
|
|
537
540
|
if (this.useContainer(t, c, this.getBackground(e)), !this.containerReused) {
|
|
538
541
|
const o = this.context.canvas;
|
|
539
|
-
o.width != s || o.height != l ? (o.width = s, o.height = l) : this.context.clearRect(0, 0, s, l), c !==
|
|
542
|
+
o.width != s || o.height != l ? (o.width = s, o.height = l) : this.context.clearRect(0, 0, s, l), c !== /** @type {HTMLCanvasElement} */
|
|
543
|
+
o.style.transform && (o.style.transform = c);
|
|
540
544
|
}
|
|
541
545
|
}
|
|
542
546
|
/**
|
|
543
547
|
* @param {import("../../render/EventType.js").default} type Event type.
|
|
544
|
-
* @param {CanvasRenderingContext2D} context Context.
|
|
548
|
+
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.
|
|
545
549
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
|
546
550
|
* @private
|
|
547
551
|
*/
|
|
548
552
|
dispatchRenderEvent_(e, t, n) {
|
|
549
553
|
const i = this.getLayer();
|
|
550
554
|
if (i.hasListener(e)) {
|
|
551
|
-
const r = new
|
|
555
|
+
const r = new it(
|
|
552
556
|
e,
|
|
553
557
|
this.inversePixelTransform,
|
|
554
558
|
n,
|
|
@@ -558,7 +562,7 @@ class lt extends ot {
|
|
|
558
562
|
}
|
|
559
563
|
}
|
|
560
564
|
/**
|
|
561
|
-
* @param {CanvasRenderingContext2D} context Context.
|
|
565
|
+
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.
|
|
562
566
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
|
563
567
|
* @protected
|
|
564
568
|
*/
|
|
@@ -566,7 +570,7 @@ class lt extends ot {
|
|
|
566
570
|
this.frameState = t, !t.declutter && this.dispatchRenderEvent_(X.PRERENDER, e, t);
|
|
567
571
|
}
|
|
568
572
|
/**
|
|
569
|
-
* @param {CanvasRenderingContext2D} context Context.
|
|
573
|
+
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context Context.
|
|
570
574
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
|
571
575
|
* @protected
|
|
572
576
|
*/
|
|
@@ -583,7 +587,7 @@ class lt extends ot {
|
|
|
583
587
|
* @return {import('../../render/canvas/ZIndexContext.js').ZIndexContextProxy} Context.
|
|
584
588
|
*/
|
|
585
589
|
getRenderContext(e) {
|
|
586
|
-
return e.declutter && !this.deferredContext_ && (this.deferredContext_ = new
|
|
590
|
+
return e.declutter && !this.deferredContext_ && (this.deferredContext_ = new at()), e.declutter ? this.deferredContext_.getContext() : this.context;
|
|
587
591
|
}
|
|
588
592
|
/**
|
|
589
593
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
|
@@ -613,15 +617,15 @@ class lt extends ot {
|
|
|
613
617
|
* @return {!import("../../transform.js").Transform} Transform.
|
|
614
618
|
*/
|
|
615
619
|
getRenderTransform(e, t, n, i, r, a, s) {
|
|
616
|
-
const l = r / 2, c = a / 2, o = i / t,
|
|
620
|
+
const l = r / 2, c = a / 2, o = i / t, h = -o, d = -e[0] + s, g = -e[1];
|
|
617
621
|
return ae(
|
|
618
622
|
this.tempTransform,
|
|
619
623
|
l,
|
|
620
624
|
c,
|
|
621
625
|
o,
|
|
622
|
-
u,
|
|
623
|
-
-n,
|
|
624
626
|
h,
|
|
627
|
+
-n,
|
|
628
|
+
d,
|
|
625
629
|
g
|
|
626
630
|
);
|
|
627
631
|
}
|
|
@@ -633,44 +637,41 @@ class lt extends ot {
|
|
|
633
637
|
delete this.frameState, super.disposeInternal();
|
|
634
638
|
}
|
|
635
639
|
}
|
|
636
|
-
function
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
if (!(t in d))
|
|
641
|
-
return d[t] = /* @__PURE__ */ new Set([e]), !0;
|
|
642
|
-
const n = d[t], i = n.has(e);
|
|
640
|
+
function se(u, e, t) {
|
|
641
|
+
if (!(t in u))
|
|
642
|
+
return u[t] = /* @__PURE__ */ new Set([e]), !0;
|
|
643
|
+
const n = u[t], i = n.has(e);
|
|
643
644
|
return i || n.add(e), !i;
|
|
644
645
|
}
|
|
645
|
-
function
|
|
646
|
-
const n =
|
|
646
|
+
function ut(u, e, t) {
|
|
647
|
+
const n = u[t];
|
|
647
648
|
return n ? n.delete(e) : !1;
|
|
648
649
|
}
|
|
649
|
-
function
|
|
650
|
-
const t =
|
|
650
|
+
function Ee(u, e) {
|
|
651
|
+
const t = u.layerStatesArray[u.layerIndex];
|
|
651
652
|
t.extent && (e = oe(
|
|
652
653
|
e,
|
|
653
|
-
re(t.extent,
|
|
654
|
+
re(t.extent, u.viewState.projection)
|
|
654
655
|
));
|
|
655
656
|
const n = (
|
|
656
657
|
/** @type {import("../../source/Tile.js").default} */
|
|
657
658
|
t.layer.getRenderSource()
|
|
658
659
|
);
|
|
659
660
|
if (!n.getWrapX()) {
|
|
660
|
-
const i = n.getTileGridForProjection(
|
|
661
|
+
const i = n.getTileGridForProjection(u.viewState.projection).getExtent();
|
|
661
662
|
i && (e = oe(e, i));
|
|
662
663
|
}
|
|
663
664
|
return e;
|
|
664
665
|
}
|
|
665
|
-
class
|
|
666
|
+
class gt extends dt {
|
|
666
667
|
/**
|
|
667
668
|
* @param {LayerType} tileLayer Tile layer.
|
|
668
669
|
* @param {Options} [options] Options.
|
|
669
670
|
*/
|
|
670
671
|
constructor(e, t) {
|
|
671
|
-
super(e), t = t || {}, this.extentChanged = !0, this.renderComplete = !1, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedTiles = [], this.renderedSourceKey_, this.renderedSourceRevision_, this.tempExtent =
|
|
672
|
+
super(e), t = t || {}, this.extentChanged = !0, this.renderComplete = !1, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedTiles = [], this.renderedSourceKey_, this.renderedSourceRevision_, this.tempExtent = We(), this.tempTileRange_ = new Pe(0, 0, 0, 0), this.tempTileCoord_ = ye(0, 0, 0);
|
|
672
673
|
const n = t.cacheSize !== void 0 ? t.cacheSize : 512;
|
|
673
|
-
this.tileCache_ = new
|
|
674
|
+
this.tileCache_ = new Ce(n), this.sourceTileCache_ = null, this.maxStaleKeys = n * 0.5;
|
|
674
675
|
}
|
|
675
676
|
/**
|
|
676
677
|
* @return {LRUCache} Tile cache.
|
|
@@ -678,6 +679,12 @@ class ht extends lt {
|
|
|
678
679
|
getTileCache() {
|
|
679
680
|
return this.tileCache_;
|
|
680
681
|
}
|
|
682
|
+
/**
|
|
683
|
+
* @return {LRUCache} Tile cache.
|
|
684
|
+
*/
|
|
685
|
+
getSourceTileCache() {
|
|
686
|
+
return this.sourceTileCache_ || (this.sourceTileCache_ = new Ce(512)), this.sourceTileCache_;
|
|
687
|
+
}
|
|
681
688
|
/**
|
|
682
689
|
* Get a tile from the cache or create one if needed.
|
|
683
690
|
*
|
|
@@ -689,17 +696,19 @@ class ht extends lt {
|
|
|
689
696
|
* @protected
|
|
690
697
|
*/
|
|
691
698
|
getOrCreateTile(e, t, n, i) {
|
|
692
|
-
const r = this.tileCache_, s = this.getLayer().getSource(), l =
|
|
699
|
+
const r = this.tileCache_, s = this.getLayer().getSource(), l = ee(s, s.getKey(), e, t, n);
|
|
693
700
|
let c;
|
|
694
701
|
if (r.containsKey(l))
|
|
695
702
|
c = r.get(l);
|
|
696
703
|
else {
|
|
704
|
+
const o = i.viewState.projection, h = s.getProjection();
|
|
697
705
|
if (c = s.getTile(
|
|
698
706
|
e,
|
|
699
707
|
t,
|
|
700
708
|
n,
|
|
701
709
|
i.pixelRatio,
|
|
702
|
-
|
|
710
|
+
o,
|
|
711
|
+
!h || He(h, o) ? void 0 : this.getSourceTileCache()
|
|
703
712
|
), !c)
|
|
704
713
|
return null;
|
|
705
714
|
r.set(l, c);
|
|
@@ -731,30 +740,30 @@ class ht extends lt {
|
|
|
731
740
|
t.pixelToCoordinateTransform,
|
|
732
741
|
e.slice()
|
|
733
742
|
), r = n.getExtent();
|
|
734
|
-
if (r && !
|
|
743
|
+
if (r && !Xe(r, i))
|
|
735
744
|
return null;
|
|
736
745
|
const a = t.viewState, s = n.getRenderSource(), l = s.getTileGridForProjection(a.projection), c = s.getTilePixelRatio(t.pixelRatio);
|
|
737
746
|
for (let o = l.getZForResolution(a.resolution); o >= l.getMinZoom(); --o) {
|
|
738
|
-
const
|
|
739
|
-
if (!
|
|
747
|
+
const h = l.getTileCoordForCoordAndZ(i, o), d = this.getTile(o, h[1], h[2], t);
|
|
748
|
+
if (!d || d.getState() !== T.LOADED)
|
|
740
749
|
continue;
|
|
741
|
-
const g = l.getOrigin(o), p =
|
|
750
|
+
const g = l.getOrigin(o), p = Fe(l.getTileSize(o)), S = l.getResolution(o);
|
|
742
751
|
let f;
|
|
743
|
-
if (
|
|
744
|
-
f =
|
|
745
|
-
else if (
|
|
746
|
-
if (f = le(
|
|
752
|
+
if (d instanceof Ke || d instanceof Me)
|
|
753
|
+
f = d.getImage();
|
|
754
|
+
else if (d instanceof Re) {
|
|
755
|
+
if (f = le(d.getData()), !f)
|
|
747
756
|
continue;
|
|
748
757
|
} else
|
|
749
758
|
continue;
|
|
750
|
-
const
|
|
751
|
-
c * ((i[0] - g[0]) / S -
|
|
752
|
-
),
|
|
753
|
-
c * ((g[1] - i[1]) / S -
|
|
759
|
+
const m = Math.floor(
|
|
760
|
+
c * ((i[0] - g[0]) / S - h[1] * p[0])
|
|
761
|
+
), K = Math.floor(
|
|
762
|
+
c * ((g[1] - i[1]) / S - h[2] * p[1])
|
|
754
763
|
), E = Math.round(
|
|
755
764
|
c * s.getGutterForProjection(a.projection)
|
|
756
765
|
);
|
|
757
|
-
return this.getImageData(f,
|
|
766
|
+
return this.getImageData(f, m + E, K + E);
|
|
758
767
|
}
|
|
759
768
|
return null;
|
|
760
769
|
}
|
|
@@ -770,7 +779,15 @@ class ht extends lt {
|
|
|
770
779
|
if (!t)
|
|
771
780
|
return !1;
|
|
772
781
|
const n = t.getRevision();
|
|
773
|
-
return this.renderedSourceRevision_ ? this.renderedSourceRevision_ !== n && (this.renderedSourceRevision_ = n, this.renderedSourceKey_ === t.getKey() && this.tileCache_.clear()) : this.renderedSourceRevision_ = n, !0;
|
|
782
|
+
return this.renderedSourceRevision_ ? this.renderedSourceRevision_ !== n && (this.renderedSourceRevision_ = n, this.renderedSourceKey_ === t.getKey() && (this.tileCache_.clear(), this.sourceTileCache_?.clear())) : this.renderedSourceRevision_ = n, !0;
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Determine whether tiles for next extent should be enqueued for rendering.
|
|
786
|
+
* @return {boolean} Rendering tiles for next extent is supported.
|
|
787
|
+
* @protected
|
|
788
|
+
*/
|
|
789
|
+
enqueueTilesForNextExtent() {
|
|
790
|
+
return !0;
|
|
774
791
|
}
|
|
775
792
|
/**
|
|
776
793
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
|
@@ -780,45 +797,45 @@ class ht extends lt {
|
|
|
780
797
|
* @param {number} preload Number of additional levels to load.
|
|
781
798
|
*/
|
|
782
799
|
enqueueTiles(e, t, n, i, r) {
|
|
783
|
-
const a = e.viewState, s = this.getLayer(), l = s.getRenderSource(), c = l.getTileGridForProjection(a.projection), o =
|
|
800
|
+
const a = e.viewState, s = this.getLayer(), l = s.getRenderSource(), c = l.getTileGridForProjection(a.projection), o = j(l);
|
|
784
801
|
o in e.wantedTiles || (e.wantedTiles[o] = {});
|
|
785
|
-
const
|
|
802
|
+
const h = e.wantedTiles[o], d = s.getMapInternal(), g = Math.max(
|
|
786
803
|
n - r,
|
|
787
804
|
c.getMinZoom(),
|
|
788
805
|
c.getZForResolution(
|
|
789
806
|
Math.min(
|
|
790
807
|
s.getMaxResolution(),
|
|
791
|
-
|
|
808
|
+
d ? d.getView().getResolutionForZoom(Math.max(s.getMinZoom(), 0)) : c.getResolution(0)
|
|
792
809
|
),
|
|
793
810
|
l.zDirection
|
|
794
811
|
)
|
|
795
|
-
), p = a.rotation, S = p ?
|
|
812
|
+
), p = a.rotation, S = p ? Ye(
|
|
796
813
|
a.center,
|
|
797
814
|
a.resolution,
|
|
798
815
|
p,
|
|
799
816
|
e.size
|
|
800
817
|
) : void 0;
|
|
801
818
|
for (let f = n; f >= g; --f) {
|
|
802
|
-
const
|
|
819
|
+
const m = c.getTileRangeForExtentAndZ(
|
|
803
820
|
t,
|
|
804
821
|
f,
|
|
805
822
|
this.tempTileRange_
|
|
806
|
-
),
|
|
807
|
-
for (let E =
|
|
808
|
-
for (let I =
|
|
823
|
+
), K = c.getResolution(f);
|
|
824
|
+
for (let E = m.minX; E <= m.maxX; ++E)
|
|
825
|
+
for (let I = m.minY; I <= m.maxY; ++I) {
|
|
809
826
|
if (p && !c.tileCoordIntersectsViewport([f, E, I], S))
|
|
810
827
|
continue;
|
|
811
828
|
const L = this.getTile(f, E, I, e);
|
|
812
829
|
if (!L || !se(i, L, f))
|
|
813
830
|
continue;
|
|
814
831
|
const y = L.getKey();
|
|
815
|
-
if (
|
|
816
|
-
const
|
|
832
|
+
if (h[y] = !0, L.getState() === T.IDLE && !e.tileQueue.isKeyQueued(y)) {
|
|
833
|
+
const N = ye(f, E, I, this.tempTileCoord_);
|
|
817
834
|
e.tileQueue.enqueue([
|
|
818
835
|
L,
|
|
819
836
|
o,
|
|
820
|
-
c.getTileCoordCenter(
|
|
821
|
-
|
|
837
|
+
c.getTileCoordCenter(N),
|
|
838
|
+
K
|
|
822
839
|
]);
|
|
823
840
|
}
|
|
824
841
|
}
|
|
@@ -835,7 +852,7 @@ class ht extends lt {
|
|
|
835
852
|
findStaleTile_(e, t) {
|
|
836
853
|
const n = this.tileCache_, i = e[0], r = e[1], a = e[2], s = this.getStaleKeys();
|
|
837
854
|
for (let l = 0; l < s.length; ++l) {
|
|
838
|
-
const c =
|
|
855
|
+
const c = ee(
|
|
839
856
|
this.getLayer().getSource(),
|
|
840
857
|
s[l],
|
|
841
858
|
i,
|
|
@@ -845,7 +862,7 @@ class ht extends lt {
|
|
|
845
862
|
if (n.containsKey(c)) {
|
|
846
863
|
const o = n.peek(c);
|
|
847
864
|
if (o.getState() === T.LOADED)
|
|
848
|
-
return o.endTransition(
|
|
865
|
+
return o.endTransition(j(this)), se(t, o, i), !0;
|
|
849
866
|
}
|
|
850
867
|
}
|
|
851
868
|
return !1;
|
|
@@ -871,11 +888,11 @@ class ht extends lt {
|
|
|
871
888
|
let a = !0;
|
|
872
889
|
const s = this.tileCache_, l = this.getLayer().getRenderSource(), c = l.getKey();
|
|
873
890
|
for (let o = r.minX; o <= r.maxX; ++o)
|
|
874
|
-
for (let
|
|
875
|
-
const
|
|
891
|
+
for (let h = r.minY; h <= r.maxY; ++h) {
|
|
892
|
+
const d = ee(l, c, n, o, h);
|
|
876
893
|
let g = !1;
|
|
877
|
-
if (s.containsKey(
|
|
878
|
-
const p = s.peek(
|
|
894
|
+
if (s.containsKey(d)) {
|
|
895
|
+
const p = s.peek(d);
|
|
879
896
|
p.getState() === T.LOADED && (se(i, p, n), g = !0);
|
|
880
897
|
}
|
|
881
898
|
g || (a = !1);
|
|
@@ -898,66 +915,66 @@ class ht extends lt {
|
|
|
898
915
|
*/
|
|
899
916
|
renderFrame(e, t) {
|
|
900
917
|
this.renderComplete = !0;
|
|
901
|
-
const n = e.layerStatesArray[e.layerIndex], i = e.viewState, r = i.projection, a = i.resolution, s = i.center, l = e.pixelRatio, c = this.getLayer(), o = c.getSource(),
|
|
918
|
+
const n = e.layerStatesArray[e.layerIndex], i = e.viewState, r = i.projection, a = i.resolution, s = i.center, l = e.pixelRatio, c = this.getLayer(), o = c.getSource(), h = o.getTileGridForProjection(r), d = h.getZForResolution(a, o.zDirection), g = h.getResolution(d), p = o.getKey();
|
|
902
919
|
this.renderedSourceKey_ ? this.renderedSourceKey_ !== p && (this.prependStaleKey(this.renderedSourceKey_), this.renderedSourceKey_ = p) : this.renderedSourceKey_ = p;
|
|
903
920
|
let S = e.extent;
|
|
904
921
|
const f = o.getTilePixelRatio(l);
|
|
905
922
|
this.prepareContainer(e, t);
|
|
906
|
-
const
|
|
923
|
+
const m = this.context.canvas.width, K = this.context.canvas.height, E = n.extent && re(n.extent);
|
|
907
924
|
E && (S = oe(
|
|
908
925
|
S,
|
|
909
926
|
re(n.extent)
|
|
910
927
|
));
|
|
911
|
-
const I = g *
|
|
928
|
+
const I = g * m / 2 / f, L = g * K / 2 / f, z = [
|
|
912
929
|
s[0] - I,
|
|
913
930
|
s[1] - L,
|
|
914
931
|
s[0] + I,
|
|
915
932
|
s[1] + L
|
|
916
933
|
], y = {};
|
|
917
934
|
this.renderedTiles.length = 0;
|
|
918
|
-
const
|
|
919
|
-
if (e.nextExtent) {
|
|
920
|
-
const x =
|
|
935
|
+
const N = c.getPreload();
|
|
936
|
+
if (e.nextExtent && this.enqueueTilesForNextExtent()) {
|
|
937
|
+
const x = h.getZForResolution(
|
|
921
938
|
i.nextResolution,
|
|
922
939
|
o.zDirection
|
|
923
|
-
), R =
|
|
924
|
-
this.enqueueTiles(e, R, x, y,
|
|
940
|
+
), R = Ee(e, e.nextExtent);
|
|
941
|
+
this.enqueueTiles(e, R, x, y, N);
|
|
925
942
|
}
|
|
926
|
-
const ce =
|
|
927
|
-
if (this.enqueueTiles(e, ce,
|
|
943
|
+
const ce = Ee(e, S);
|
|
944
|
+
if (this.enqueueTiles(e, ce, d, y, 0), N > 0 && setTimeout(() => {
|
|
928
945
|
this.enqueueTiles(
|
|
929
946
|
e,
|
|
930
947
|
ce,
|
|
931
|
-
|
|
948
|
+
d - 1,
|
|
932
949
|
y,
|
|
933
|
-
|
|
950
|
+
N - 1
|
|
934
951
|
);
|
|
935
|
-
}, 0), !(
|
|
952
|
+
}, 0), !(d in y))
|
|
936
953
|
return this.container;
|
|
937
|
-
const he =
|
|
938
|
-
for (const x of y[
|
|
954
|
+
const he = j(this), ve = e.time;
|
|
955
|
+
for (const x of y[d]) {
|
|
939
956
|
const R = x.getState();
|
|
940
957
|
if (R === T.EMPTY)
|
|
941
958
|
continue;
|
|
942
959
|
const D = x.tileCoord;
|
|
943
|
-
if (R === T.LOADED && x.getAlpha(he,
|
|
960
|
+
if (R === T.LOADED && x.getAlpha(he, ve) === 1) {
|
|
944
961
|
x.endTransition(he);
|
|
945
962
|
continue;
|
|
946
963
|
}
|
|
947
964
|
if (R !== T.ERROR && (this.renderComplete = !1), this.findStaleTile_(D, y)) {
|
|
948
|
-
|
|
965
|
+
ut(y, x, d), e.animate = !0;
|
|
949
966
|
continue;
|
|
950
967
|
}
|
|
951
968
|
if (this.findAltTiles_(
|
|
952
|
-
|
|
969
|
+
h,
|
|
953
970
|
D,
|
|
954
|
-
|
|
971
|
+
d + 1,
|
|
955
972
|
y
|
|
956
973
|
))
|
|
957
974
|
continue;
|
|
958
|
-
const
|
|
959
|
-
for (let M =
|
|
960
|
-
|
|
975
|
+
const b = h.getMinZoom();
|
|
976
|
+
for (let M = d - 1; M >= b && !this.findAltTiles_(
|
|
977
|
+
h,
|
|
961
978
|
D,
|
|
962
979
|
M,
|
|
963
980
|
y
|
|
@@ -967,51 +984,51 @@ class ht extends lt {
|
|
|
967
984
|
const U = g / a * l / f, _ = this.getRenderContext(e);
|
|
968
985
|
ae(
|
|
969
986
|
this.tempTransform,
|
|
970
|
-
|
|
971
|
-
|
|
987
|
+
m / 2,
|
|
988
|
+
K / 2,
|
|
972
989
|
U,
|
|
973
990
|
U,
|
|
974
991
|
0,
|
|
975
|
-
-
|
|
976
|
-
-
|
|
992
|
+
-m / 2,
|
|
993
|
+
-K / 2
|
|
977
994
|
), n.extent && this.clipUnrotated(_, e, E), o.getInterpolate() || (_.imageSmoothingEnabled = !1), this.preRender(_, e);
|
|
978
|
-
const
|
|
979
|
-
|
|
995
|
+
const q = Object.keys(y).map(Number);
|
|
996
|
+
q.sort($e);
|
|
980
997
|
let w;
|
|
981
998
|
const $ = [], de = [];
|
|
982
|
-
for (let x =
|
|
983
|
-
const R =
|
|
999
|
+
for (let x = q.length - 1; x >= 0; --x) {
|
|
1000
|
+
const R = q[x], D = o.getTilePixelSize(
|
|
984
1001
|
R,
|
|
985
1002
|
l,
|
|
986
1003
|
r
|
|
987
|
-
), A =
|
|
988
|
-
|
|
1004
|
+
), A = h.getResolution(R) / g, b = D[0] * A * U, M = D[1] * A * U, G = h.getTileCoordForCoordAndZ(
|
|
1005
|
+
we(z),
|
|
989
1006
|
R
|
|
990
|
-
), ue =
|
|
991
|
-
f * (ue[0] -
|
|
992
|
-
f * (
|
|
993
|
-
]),
|
|
994
|
-
for (const
|
|
995
|
-
if (
|
|
1007
|
+
), ue = h.getTileCoordExtent(G), B = v(this.tempTransform, [
|
|
1008
|
+
f * (ue[0] - z[0]) / g,
|
|
1009
|
+
f * (z[3] - ue[3]) / g
|
|
1010
|
+
]), Se = f * o.getGutterForProjection(r);
|
|
1011
|
+
for (const Z of y[R]) {
|
|
1012
|
+
if (Z.getState() !== T.LOADED)
|
|
996
1013
|
continue;
|
|
997
|
-
const ge =
|
|
1014
|
+
const ge = Z.tileCoord, fe = G[1] - ge[1], Ie = Math.round(B[0] - (fe - 1) * b), _e = G[2] - ge[2], Le = Math.round(B[1] - (_e - 1) * M), O = Math.round(B[0] - fe * b), P = Math.round(B[1] - _e * M), V = Ie - O, W = Le - P, pe = q.length === 1;
|
|
998
1015
|
let J = !1;
|
|
999
|
-
w = [O,
|
|
1000
|
-
for (let
|
|
1001
|
-
if (!pe && R < de[
|
|
1002
|
-
const
|
|
1003
|
-
|
|
1004
|
-
[O,
|
|
1005
|
-
[
|
|
1006
|
-
) && (J || (_.save(), J = !0), _.beginPath(), _.moveTo(w[0], w[1]), _.lineTo(w[2], w[3]), _.lineTo(w[4], w[5]), _.lineTo(w[6], w[7]), _.moveTo(
|
|
1016
|
+
w = [O, P, O + V, P, O + V, P + W, O, P + W];
|
|
1017
|
+
for (let H = 0, De = $.length; H < De; ++H)
|
|
1018
|
+
if (!pe && R < de[H]) {
|
|
1019
|
+
const C = $[H];
|
|
1020
|
+
Qe(
|
|
1021
|
+
[O, P, O + V, P + W],
|
|
1022
|
+
[C[0], C[3], C[4], C[7]]
|
|
1023
|
+
) && (J || (_.save(), J = !0), _.beginPath(), _.moveTo(w[0], w[1]), _.lineTo(w[2], w[3]), _.lineTo(w[4], w[5]), _.lineTo(w[6], w[7]), _.moveTo(C[6], C[7]), _.lineTo(C[4], C[5]), _.lineTo(C[2], C[3]), _.lineTo(C[0], C[1]), _.clip());
|
|
1007
1024
|
}
|
|
1008
|
-
$.push(w), de.push(R), this.drawTile(
|
|
1025
|
+
$.push(w), de.push(R), this.drawTile(Z, e, O, P, V, W, Se, pe), J && _.restore(), this.renderedTiles.unshift(Z), this.updateUsedTiles(e.usedTiles, o, Z);
|
|
1009
1026
|
}
|
|
1010
1027
|
}
|
|
1011
|
-
if (this.renderedResolution = g, this.extentChanged = !this.renderedExtent_ || !
|
|
1028
|
+
if (this.renderedResolution = g, this.extentChanged = !this.renderedExtent_ || !Je(this.renderedExtent_, z), this.renderedExtent_ = z, this.renderedPixelRatio = l, this.postRender(this.context, e), n.extent && _.restore(), _.imageSmoothingEnabled = !0, this.renderComplete) {
|
|
1012
1029
|
const x = (R, D) => {
|
|
1013
|
-
const Q =
|
|
1014
|
-
this.updateCacheSize(
|
|
1030
|
+
const Q = j(o), A = D.wantedTiles[Q], b = A ? Object.keys(A).length : 0;
|
|
1031
|
+
this.updateCacheSize(b), this.tileCache_.expireCache(), this.sourceTileCache_?.expireCache();
|
|
1015
1032
|
};
|
|
1016
1033
|
e.postRenderFunctions.push(x);
|
|
1017
1034
|
}
|
|
@@ -1050,7 +1067,7 @@ class ht extends lt {
|
|
|
1050
1067
|
);
|
|
1051
1068
|
if (!c)
|
|
1052
1069
|
return;
|
|
1053
|
-
const o = this.getRenderContext(t),
|
|
1070
|
+
const o = this.getRenderContext(t), h = j(this), d = t.layerStatesArray[t.layerIndex], g = d.opacity * (l ? e.getAlpha(h, t.time) : 1), p = g !== o.globalAlpha;
|
|
1054
1071
|
p && (o.save(), o.globalAlpha = g), o.drawImage(
|
|
1055
1072
|
c,
|
|
1056
1073
|
s,
|
|
@@ -1061,10 +1078,10 @@ class ht extends lt {
|
|
|
1061
1078
|
i,
|
|
1062
1079
|
r,
|
|
1063
1080
|
a
|
|
1064
|
-
), p && o.restore(), g !==
|
|
1081
|
+
), p && o.restore(), g !== d.opacity ? t.animate = !0 : l && e.endTransition(h);
|
|
1065
1082
|
}
|
|
1066
1083
|
/**
|
|
1067
|
-
* @return {HTMLCanvasElement} Image
|
|
1084
|
+
* @return {HTMLCanvasElement|OffscreenCanvas} Image
|
|
1068
1085
|
*/
|
|
1069
1086
|
getImage() {
|
|
1070
1087
|
const e = this.context;
|
|
@@ -1073,7 +1090,7 @@ class ht extends lt {
|
|
|
1073
1090
|
/**
|
|
1074
1091
|
* Get the image from a tile.
|
|
1075
1092
|
* @param {import("../../ImageTile.js").default} tile Tile.
|
|
1076
|
-
* @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.
|
|
1093
|
+
* @return {HTMLCanvasElement|OffscreenCanvas|HTMLImageElement|HTMLVideoElement} Image.
|
|
1077
1094
|
* @protected
|
|
1078
1095
|
*/
|
|
1079
1096
|
getTileImage(e) {
|
|
@@ -1086,7 +1103,7 @@ class ht extends lt {
|
|
|
1086
1103
|
* @protected
|
|
1087
1104
|
*/
|
|
1088
1105
|
updateUsedTiles(e, t, n) {
|
|
1089
|
-
const i =
|
|
1106
|
+
const i = j(t);
|
|
1090
1107
|
i in e || (e[i] = {}), e[i][n.getKey()] = !0;
|
|
1091
1108
|
}
|
|
1092
1109
|
}
|
|
@@ -1094,7 +1111,7 @@ const Y = {
|
|
|
1094
1111
|
PRELOAD: "preload",
|
|
1095
1112
|
USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError"
|
|
1096
1113
|
};
|
|
1097
|
-
class
|
|
1114
|
+
class ft extends st {
|
|
1098
1115
|
/**
|
|
1099
1116
|
* @param {Options<TileSourceType>} [options] Tile layer options.
|
|
1100
1117
|
*/
|
|
@@ -1175,7 +1192,7 @@ class dt extends et {
|
|
|
1175
1192
|
return super.getData(e);
|
|
1176
1193
|
}
|
|
1177
1194
|
}
|
|
1178
|
-
class
|
|
1195
|
+
class _t extends ft {
|
|
1179
1196
|
/**
|
|
1180
1197
|
* @param {import("./BaseTile.js").Options<TileSourceType>} [options] Tile layer options.
|
|
1181
1198
|
*/
|
|
@@ -1186,21 +1203,21 @@ class ut extends dt {
|
|
|
1186
1203
|
* @override
|
|
1187
1204
|
*/
|
|
1188
1205
|
createRenderer() {
|
|
1189
|
-
return new
|
|
1206
|
+
return new gt(this, {
|
|
1190
1207
|
cacheSize: this.getCacheSize()
|
|
1191
1208
|
});
|
|
1192
1209
|
}
|
|
1193
1210
|
}
|
|
1194
|
-
const
|
|
1211
|
+
const Et = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1195
1212
|
__proto__: null,
|
|
1196
|
-
default:
|
|
1213
|
+
default: _t
|
|
1197
1214
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1198
1215
|
export {
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1216
|
+
dt as C,
|
|
1217
|
+
_t as T,
|
|
1218
|
+
at as Z,
|
|
1219
|
+
gt as a,
|
|
1203
1220
|
Y as b,
|
|
1204
|
-
|
|
1205
|
-
|
|
1221
|
+
Ct as c,
|
|
1222
|
+
Et as d
|
|
1206
1223
|
};
|