Rework condition
This commit is contained in:
@@ -305,14 +305,13 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer {
|
|||||||
* @return {boolean} Layer is ready to be rendered.
|
* @return {boolean} Layer is ready to be rendered.
|
||||||
*/
|
*/
|
||||||
prepareFrameInternal(frameState) {
|
prepareFrameInternal(frameState) {
|
||||||
this.projection_ =
|
if (!this.projection_) {
|
||||||
this.projection_ === undefined
|
this.projection_ = frameState.viewState.projection;
|
||||||
? frameState.viewState.projection
|
} else if (frameState.viewState.projection !== this.projection_) {
|
||||||
: this.projection_;
|
|
||||||
if (frameState.viewState.projection !== this.projection_) {
|
|
||||||
this.clearCache();
|
this.clearCache();
|
||||||
this.projection_ = frameState.viewState.projection;
|
this.projection_ = frameState.viewState.projection;
|
||||||
}
|
}
|
||||||
|
|
||||||
const layer = this.getLayer();
|
const layer = this.getLayer();
|
||||||
const source = layer.getRenderSource();
|
const source = layer.getRenderSource();
|
||||||
if (!source) {
|
if (!source) {
|
||||||
|
|||||||
Reference in New Issue
Block a user