Merge pull request #13227 from tschaub/default-cors-mode

Default CORS mode for WebGL rendered sources
This commit is contained in:
Tim Schaub
2022-01-11 16:22:03 -07:00
committed by GitHub
6 changed files with 25 additions and 5 deletions

View File

@@ -175,6 +175,12 @@ class TileTexture extends EventTarget {
if (this.loaded) {
this.uploadTile_();
} else {
if (tile instanceof ImageTile) {
const image = tile.getImage();
if (image instanceof Image && !image.crossOrigin) {
image.crossOrigin = 'anonymous';
}
}
tile.addEventListener(EventType.CHANGE, this.handleTileChange_);
}
}