this._url keep an url after _initImage
updated ImageOverlay and VideoOverlay
This commit is contained in:
parent
39c3bf7ed3
commit
575ced6e2c
@ -202,7 +202,10 @@ export var ImageOverlay = Layer.extend({
|
|||||||
this._updateZIndex();
|
this._updateZIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wasElementSupplied) { return; }
|
if (wasElementSupplied) {
|
||||||
|
this._url = img.src;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
img.src = this._url;
|
img.src = this._url;
|
||||||
img.alt = this.options.alt;
|
img.alt = this.options.alt;
|
||||||
|
@ -49,7 +49,10 @@ export var VideoOverlay = ImageOverlay.extend({
|
|||||||
// Fired when the video has finished loading the first frame
|
// Fired when the video has finished loading the first frame
|
||||||
vid.onloadeddata = Util.bind(this.fire, this, 'load');
|
vid.onloadeddata = Util.bind(this.fire, this, 'load');
|
||||||
|
|
||||||
if (wasElementSupplied) { return; }
|
if (wasElementSupplied) {
|
||||||
|
this._url = vid.src;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Util.isArray(this._url)) { this._url = [this._url]; }
|
if (!Util.isArray(this._url)) { this._url = [this._url]; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user