Allow '' for crossOrigin (as Anonymous alias)
This fixes a regression introduced by the goog.isDef removal. From the HTML 5 spec: "The empty string is also a valid keyword, and maps to the Anonymous state"
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ ol.Image = function(extent, resolution, pixelRatio, attributions, src,
|
|||||||
* @type {HTMLCanvasElement|Image|HTMLVideoElement}
|
* @type {HTMLCanvasElement|Image|HTMLVideoElement}
|
||||||
*/
|
*/
|
||||||
this.image_ = new Image();
|
this.image_ = new Image();
|
||||||
if (crossOrigin) {
|
if (crossOrigin !== null) {
|
||||||
this.image_.crossOrigin = crossOrigin;
|
this.image_.crossOrigin = crossOrigin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ ol.ImageTile = function(tileCoord, state, src, crossOrigin, tileLoadFunction) {
|
|||||||
* @type {Image}
|
* @type {Image}
|
||||||
*/
|
*/
|
||||||
this.image_ = new Image();
|
this.image_ = new Image();
|
||||||
if (crossOrigin) {
|
if (crossOrigin !== null) {
|
||||||
this.image_.crossOrigin = crossOrigin;
|
this.image_.crossOrigin = crossOrigin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ ol.style.IconImage_ = function(image, src, size, crossOrigin, imageState) {
|
|||||||
*/
|
*/
|
||||||
this.image_ = !image ? new Image() : image;
|
this.image_ = !image ? new Image() : image;
|
||||||
|
|
||||||
if (crossOrigin) {
|
if (crossOrigin !== null) {
|
||||||
this.image_.crossOrigin = crossOrigin;
|
this.image_.crossOrigin = crossOrigin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user