Fixes comments.

This commit is contained in:
damencho 2016-10-26 17:18:36 -05:00
parent 7acda03024
commit 3ae299cf2b
1 changed files with 9 additions and 22 deletions

View File

@ -54,18 +54,6 @@ SmallVideo.prototype.isVisible = function () {
return $('#' + this.videoSpanId).is(':visible'); return $('#' + this.videoSpanId).is(':visible');
}; };
SmallVideo.prototype.showDisplayName = function(isShow) {
var nameSpan = $('#' + this.videoSpanId + ' .displayname').get(0);
if (isShow) {
if (nameSpan && nameSpan.innerHTML && nameSpan.innerHTML.length)
nameSpan.setAttribute("style", "display:inline-block;");
}
else {
if (nameSpan)
nameSpan.setAttribute("style", "display:none;");
}
};
/** /**
* Enables / disables the device availability icons for this small video. * Enables / disables the device availability icons for this small video.
* @param {enable} set to {true} to enable and {false} to disable * @param {enable} set to {true} to enable and {false} to disable
@ -160,25 +148,24 @@ SmallVideo.getStreamElementID = function (stream) {
*/ */
SmallVideo.prototype.bindHoverHandler = function () { SmallVideo.prototype.bindHoverHandler = function () {
// Add hover handler // Add hover handler
var self = this;
$(this.container).hover( $(this.container).hover(
function () { () => {
if (!self.VideoLayout.isCurrentlyOnLarge(self.id)) { if (!this.VideoLayout.isCurrentlyOnLarge(this.id)) {
$('#' + self.videoSpanId + ' .videocontainer__overlay') $('#' + this.videoSpanId + ' .videocontainer__overlay')
.removeClass("hide") .removeClass("hide")
.addClass("show-inline"); .addClass("show-inline");
UIUtil.setVisibility(this.$displayName(), true);
} }
self.showDisplayName(true);
}, },
function () { () => {
$('#' + self.videoSpanId + ' .videocontainer__overlay') $('#' + this.videoSpanId + ' .videocontainer__overlay')
.removeClass("show-inline") .removeClass("show-inline")
.addClass("hide"); .addClass("hide");
// If the video has been "pinned" by the user we want to // If the video has been "pinned" by the user we want to
// keep the display name on place. // keep the display name on place.
if (!self.VideoLayout.isLargeVideoVisible() || if (!this.VideoLayout.isLargeVideoVisible() ||
!self.VideoLayout.isCurrentlyOnLarge(self.id)) !this.VideoLayout.isCurrentlyOnLarge(this.id))
self.showDisplayName(false); UIUtil.setVisibility(this.$displayName(), false);
} }
); );
}; };