Skip to content

Commit

Permalink
fix(tile-view): back to single click to pin
Browse files Browse the repository at this point in the history
Undoes the logic added in:
ebcde74
  • Loading branch information
Leonard Kim authored and virtuacoplenny committed Jun 18, 2019
1 parent 54a9b91 commit 4cea701
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 31 deletions.
1 change: 0 additions & 1 deletion modules/UI/shared_video/SharedVideoThumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default function SharedVideoThumb(participant, videoType, VideoLayout) {
this.updateDisplayName();

this.container.onclick = this._onContainerClick;
this.container.ondblclick = this._onContainerDoubleClick;
}
SharedVideoThumb.prototype = Object.create(SmallVideo.prototype);
SharedVideoThumb.prototype.constructor = SharedVideoThumb;
Expand Down
1 change: 0 additions & 1 deletion modules/UI/videolayout/LocalVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ function LocalVideo(VideoLayout, emitter, streamEndedCallback) {
this.updateIndicators();

this.container.onclick = this._onContainerClick;
this.container.ondblclick = this._onContainerDoubleClick;
}

LocalVideo.prototype = Object.create(SmallVideo.prototype);
Expand Down
1 change: 0 additions & 1 deletion modules/UI/videolayout/RemoteVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ function RemoteVideo(user, VideoLayout, emitter) {
this._stopRemoteControl = this._stopRemoteControl.bind(this);

this.container.onclick = this._onContainerClick;
this.container.ondblclick = this._onContainerDoubleClick;
}

RemoteVideo.prototype = Object.create(SmallVideo.prototype);
Expand Down
29 changes: 1 addition & 28 deletions modules/UI/videolayout/SmallVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ function SmallVideo(VideoLayout) {
this.updateView = this.updateView.bind(this);

this._onContainerClick = this._onContainerClick.bind(this);
this._onContainerDoubleClick = this._onContainerDoubleClick.bind(this);
}

/**
Expand Down Expand Up @@ -859,20 +858,6 @@ SmallVideo.prototype.updateIndicators = function() {
);
};

/**
* Callback invoked when the thumbnail is double clicked. Will pin the
* participant if in tile view.
*
* @param {MouseEvent} event - The click event to intercept.
* @private
* @returns {void}
*/
SmallVideo.prototype._onContainerDoubleClick = function(event) {
if (this._pinningRequiresDoubleClick() && this._shouldTriggerPin(event)) {
APP.store.dispatch(pinParticipant(this.id));
}
};

/**
* Callback invoked when the thumbnail is clicked and potentially trigger
* pinning of the participant.
Expand All @@ -882,8 +867,7 @@ SmallVideo.prototype._onContainerDoubleClick = function(event) {
* @returns {void}
*/
SmallVideo.prototype._onContainerClick = function(event) {
const triggerPin = this._shouldTriggerPin(event)
&& !this._pinningRequiresDoubleClick();
const triggerPin = this._shouldTriggerPin(event);

if (event.stopPropagation && triggerPin) {
event.stopPropagation();
Expand Down Expand Up @@ -934,17 +918,6 @@ SmallVideo.prototype.togglePin = function() {
APP.store.dispatch(pinParticipant(participantIdToPin));
};

/**
* Returns whether or not clicking to pin the participant needs to be a double
* click instead of a single click.
*
* @private
* @returns {boolean}
*/
SmallVideo.prototype._pinningRequiresDoubleClick = function() {
return shouldDisplayTileView(APP.store.getState());
};

/**
* Removes the React element responsible for showing connection status, dominant
* speaker, and raised hand icons.
Expand Down

0 comments on commit 4cea701

Please # to comment.