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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "10.6.2-dev.1761852891970",
3
+ "version": "10.6.2-dev.1762157720737",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -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;IA0I9B;;;OAGG;IACH,sBAHW,OAAO,WAAW,EAAE,UAAU,eAC9B,KAAK,CAAC,OAAO,mBAAmB,EAAE,KAAK,CAAC,QAgBlD;CACF;wBArNuB,UAAU"}
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"}
@@ -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
- if (!isCanvas(canvas)) {
169
- continue;
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
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '10.6.2-dev.1761852891970';
36
+ export const VERSION = '10.6.2-dev.1762157720737';