ol 10.6.2-dev.1761852891970 → 10.6.2-dev.1762157720737
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/ol.js +1 -1
- package/dist/ol.js.map +1 -1
- package/package.json +1 -1
- package/renderer/Composite.d.ts.map +1 -1
- package/renderer/Composite.js +5 -8
- package/util.js +1 -1
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Composite.d.ts","sourceRoot":"","sources":["Composite.js"],"names":[],"mappings":";AAgBA;;;;GAIG;AACH;IAOI;;;OAGG;IACH,+BAKC;IAED;;;OAGG;IACH,iBAEiC;IAejC;;;OAGG;IACH,kBAAmB;IAEnB;;;OAGG;IACH,yBAA4B;
|
|
1
|
+
{"version":3,"file":"Composite.d.ts","sourceRoot":"","sources":["Composite.js"],"names":[],"mappings":";AAgBA;;;;GAIG;AACH;IAOI;;;OAGG;IACH,+BAKC;IAED;;;OAGG;IACH,iBAEiC;IAejC;;;OAGG;IACH,kBAAmB;IAEnB;;;OAGG;IACH,yBAA4B;IAuI9B;;;OAGG;IACH,sBAHW,OAAO,WAAW,EAAE,UAAU,eAC9B,KAAK,CAAC,OAAO,mBAAmB,EAAE,KAAK,CAAC,QAgBlD;CACF;wBAlNuB,UAAU"}
|
package/renderer/Composite.js
CHANGED
|
@@ -165,10 +165,12 @@ class CompositeMapRenderer extends MapRenderer {
|
|
|
165
165
|
const mapContext = mapCanvas.getContext('2d');
|
|
166
166
|
for (const container of this.children_) {
|
|
167
167
|
const canvas = container.firstElementChild || container;
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
const backgroundColor = container.style.backgroundColor;
|
|
169
|
+
if (backgroundColor && (!isCanvas(canvas) || canvas.width > 0)) {
|
|
170
|
+
mapContext.fillStyle = backgroundColor;
|
|
171
|
+
mapContext.fillRect(0, 0, mapCanvas.width, mapCanvas.height);
|
|
170
172
|
}
|
|
171
|
-
if (canvas.width > 0) {
|
|
173
|
+
if (isCanvas(canvas) && canvas.width > 0) {
|
|
172
174
|
const opacity = container.style.opacity || canvas.style.opacity;
|
|
173
175
|
mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);
|
|
174
176
|
const transform = canvas.style.transform;
|
|
@@ -184,11 +186,6 @@ class CompositeMapRenderer extends MapRenderer {
|
|
|
184
186
|
const h = parseFloat(canvas.style.height) / canvas.height;
|
|
185
187
|
mapContext.setTransform(w, 0, 0, h, 0, 0);
|
|
186
188
|
}
|
|
187
|
-
const backgroundColor = container.style.backgroundColor;
|
|
188
|
-
if (backgroundColor) {
|
|
189
|
-
mapContext.fillStyle = backgroundColor;
|
|
190
|
-
mapContext.fillRect(0, 0, canvas.width, canvas.height);
|
|
191
|
-
}
|
|
192
189
|
mapContext.drawImage(canvas, 0, 0);
|
|
193
190
|
}
|
|
194
191
|
}
|
package/util.js
CHANGED