Skip to content

Commit

Permalink
Website updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Sep 21, 2024
1 parent 09c14ef commit 9e7e050
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ <h4 class="name">

<div class="tag-source">
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/layer/WebGLTile.js">layer/WebGLTile.js</a>,
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/layer/WebGLTile.js#L505">line 505</a>
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/layer/WebGLTile.js#L516">line 516</a>
</div>

</div>
Expand Down Expand Up @@ -5914,7 +5914,7 @@ <h4 class="name">

<div class="tag-source">
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/layer/WebGLTile.js">layer/WebGLTile.js</a>,
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/layer/WebGLTile.js#L494">line 494</a>
<a href="https://github.com/openlayers/openlayers/blob/main/src/ol/layer/WebGLTile.js#L505">line 505</a>
</div>

</div>
Expand Down
2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/examples/common.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/dist/ol.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/en/main/ol/layer/WebGLTile.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions dist/en/main/ol/layer/WebGLTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,19 @@ class WebGLTileLayer extends BaseTileLayer {
if (this.hasRenderer()) {
this.getRenderer().clearCache();
}
if (this.getSource()) {
this.setStyle(this.style_);
const source = this.getSource();
if (source) {
if (source.getState() === 'loading') {
const onChange = () => {
if (source.getState() === 'ready') {
source.removeEventListener('change', onChange);
this.setStyle(this.style_);
}
};
source.addEventListener('change', onChange);
} else {
this.setStyle(this.style_);
}
}
}

Expand Down

0 comments on commit 9e7e050

Please sign in to comment.