ol 10.6.2-dev.1761658982871 → 10.6.2-dev.1762089635046

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/dom.d.ts CHANGED
@@ -55,7 +55,8 @@ export function removeChildren(node: Node): void;
55
55
  */
56
56
  export function replaceChildren(node: Node, children: Array<Node>): void;
57
57
  /**
58
- * Creates a minimal structure that mocks a DIV to be used in a worker environment
58
+ * Creates a minimal structure that mocks a DIV to be used by the composite and
59
+ * layer renderer in a worker environment
59
60
  * @return {HTMLDivElement} mocked DIV
60
61
  */
61
62
  export function createMockDiv(): HTMLDivElement;
package/dom.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["dom.js"],"names":[],"mappings":"AAEA;;GAEG;AAGH;;;;;;;GAOG;AACH,8CANW,MAAM,WACN,MAAM,eACN,KAAK,CAAC,iBAAiB,GAAC,eAAe,CAAC,aACxC,gCAAgC,GAC/B,wBAAwB,GAAC,iCAAiC,CAuBrE;AAOD;;GAEG;AACH,4CAFY,wBAAwB,GAAC,iCAAiC,CAOrE;AAED;;;;GAIG;AACH,uCAFW,wBAAwB,GAAC,iCAAiC,QAOpE;AAED;;;;;;GAMG;AACH,oCAHY,WAAW,GACX,MAAM,CAQjB;AAED;;;;;;GAMG;AACH,qCAHY,WAAW,GACX,MAAM,CAQjB;AAED;;;GAGG;AACH,qCAHW,IAAI,WACJ,IAAI,QAOd;AAED;;GAEG;AACH,qCAFW,IAAI,QAMd;AAED;;;;;;;GAOG;AACH,sCAHW,IAAI,YACJ,KAAK,CAAC,IAAI,CAAC,QAmCrB;AAED;;;GAGG;AACH,iCAFY,cAAc,CAsDzB;AAED;;;GAGG;AACH,8BAHW,GAAC,GACA,GAAG,IAAI,CAAC,iBAAiB,GAAG,eAAe,CAAC,CAQvD"}
1
+ {"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["dom.js"],"names":[],"mappings":"AAEA;;GAEG;AAGH;;;;;;;GAOG;AACH,8CANW,MAAM,WACN,MAAM,eACN,KAAK,CAAC,iBAAiB,GAAC,eAAe,CAAC,aACxC,gCAAgC,GAC/B,wBAAwB,GAAC,iCAAiC,CAuBrE;AAOD;;GAEG;AACH,4CAFY,wBAAwB,GAAC,iCAAiC,CAOrE;AAED;;;;GAIG;AACH,uCAFW,wBAAwB,GAAC,iCAAiC,QAOpE;AAED;;;;;;GAMG;AACH,oCAHY,WAAW,GACX,MAAM,CAQjB;AAED;;;;;;GAMG;AACH,qCAHY,WAAW,GACX,MAAM,CAQjB;AAED;;;GAGG;AACH,qCAHW,IAAI,WACJ,IAAI,QAOd;AAED;;GAEG;AACH,qCAFW,IAAI,QAMd;AAED;;;;;;;GAOG;AACH,sCAHW,IAAI,YACJ,KAAK,CAAC,IAAI,CAAC,QAmCrB;AAED;;;;GAIG;AACH,iCAFY,cAAc,CA0DzB;AAED;;;GAGG;AACH,8BAHW,GAAC,GACA,GAAG,IAAI,CAAC,iBAAiB,GAAG,eAAe,CAAC,CAQvD"}
package/dom.js CHANGED
@@ -157,7 +157,8 @@ export function replaceChildren(node, children) {
157
157
  }
158
158
 
159
159
  /**
160
- * Creates a minimal structure that mocks a DIV to be used in a worker environment
160
+ * Creates a minimal structure that mocks a DIV to be used by the composite and
161
+ * layer renderer in a worker environment
161
162
  * @return {HTMLDivElement} mocked DIV
162
163
  */
163
164
  export function createMockDiv() {
@@ -175,6 +176,10 @@ export function createMockDiv() {
175
176
  this.childNodes.push(node);
176
177
  return node;
177
178
  },
179
+ /**
180
+ * dummy function, as this structure is not supposed to have a parent.
181
+ */
182
+ remove: function () {},
178
183
  /**
179
184
  * @param {HTMLElement} node html node.
180
185
  * @return {HTMLElement} html node.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "10.6.2-dev.1761658982871",
3
+ "version": "10.6.2-dev.1762089635046",
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.1761658982871';
36
+ export const VERSION = '10.6.2-dev.1762089635046';