更新 infowindow-view.js
This commit is contained in:
parent
5bb9532afc
commit
365100b613
@ -184,8 +184,7 @@ var Infowindow = View.extend({
|
||||
$cover.append($video);
|
||||
|
||||
$video
|
||||
// .load(this._onLoadVideoSuccess)
|
||||
.load(this._stopCoverLoader)
|
||||
.load(this._onLoadVideoSuccess)
|
||||
.error(this._onLoadVideoError)
|
||||
// .attr('src', url);
|
||||
},
|
||||
@ -196,6 +195,11 @@ var Infowindow = View.extend({
|
||||
},
|
||||
|
||||
_onLoadVideoSuccess: function () {
|
||||
|
||||
this._stopCoverLoader();
|
||||
|
||||
return;
|
||||
|
||||
var $cover = this.$('.js-cover');
|
||||
var $img = this.$('.CDB-infowindow-media-item');
|
||||
var url = $img.attr('src');
|
||||
@ -222,7 +226,7 @@ var Infowindow = View.extend({
|
||||
// end video
|
||||
|
||||
_initBinds: function () {
|
||||
_.bindAll(this, '_onKeyUp', '_onLoadImageSuccess', '_onLoadImageError');
|
||||
_.bindAll(this, '_onKeyUp', '_onLoadImageSuccess', '_onLoadImageError', '_onLoadVideoSuccess', '_onLoadVideoError');
|
||||
|
||||
this.listenTo(this.model, 'change:content change:alternative_names change:width change:maxHeight', this.render, this);
|
||||
this.listenTo(this.model, 'change:latlng', this._updateAndAdjustPan, this);
|
||||
|
Loading…
Reference in New Issue
Block a user