Skip to content

Commit 728e115

Browse files
committed
Website updates
1 parent 57a6a8e commit 728e115

11 files changed

+15
-18
lines changed

dist/en/main/examples/common.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/common.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/offscreen-canvas.worker.worker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/offscreen-canvas.worker.worker.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/tiled-layer-rendering-in-offscreen-canvas.worker.worker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/examples/tiled-layer-rendering-in-offscreen-canvas.worker.worker.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/dist/ol.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/renderer/Composite.d.ts.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/en/main/ol/renderer/Composite.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,12 @@ class CompositeMapRenderer extends MapRenderer {
165165
const mapContext = mapCanvas.getContext('2d');
166166
for (const container of this.children_) {
167167
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);
170172
}
171-
if (canvas.width > 0) {
173+
if (isCanvas(canvas) && canvas.width > 0) {
172174
const opacity = container.style.opacity || canvas.style.opacity;
173175
mapContext.globalAlpha = opacity === '' ? 1 : Number(opacity);
174176
const transform = canvas.style.transform;
@@ -184,11 +186,6 @@ class CompositeMapRenderer extends MapRenderer {
184186
const h = parseFloat(canvas.style.height) / canvas.height;
185187
mapContext.setTransform(w, 0, 0, h, 0, 0);
186188
}
187-
const backgroundColor = container.style.backgroundColor;
188-
if (backgroundColor) {
189-
mapContext.fillStyle = backgroundColor;
190-
mapContext.fillRect(0, 0, canvas.width, canvas.height);
191-
}
192189
mapContext.drawImage(canvas, 0, 0);
193190
}
194191
}

0 commit comments

Comments
 (0)