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