瀏覽代碼

fix(tile-view): back to single click to pin

Undoes the logic added in:
ebcde745ef
j8
Leonard Kim 6 年之前
父節點
當前提交
4cea7018f5

+ 0
- 1
modules/UI/shared_video/SharedVideoThumb.js 查看文件

@@ -22,7 +22,6 @@ export default function SharedVideoThumb(participant, videoType, VideoLayout) {
22 22
     this.updateDisplayName();
23 23
 
24 24
     this.container.onclick = this._onContainerClick;
25
-    this.container.ondblclick = this._onContainerDoubleClick;
26 25
 }
27 26
 SharedVideoThumb.prototype = Object.create(SmallVideo.prototype);
28 27
 SharedVideoThumb.prototype.constructor = SharedVideoThumb;

+ 0
- 1
modules/UI/videolayout/LocalVideo.js 查看文件

@@ -62,7 +62,6 @@ function LocalVideo(VideoLayout, emitter, streamEndedCallback) {
62 62
     this.updateIndicators();
63 63
 
64 64
     this.container.onclick = this._onContainerClick;
65
-    this.container.ondblclick = this._onContainerDoubleClick;
66 65
 }
67 66
 
68 67
 LocalVideo.prototype = Object.create(SmallVideo.prototype);

+ 0
- 1
modules/UI/videolayout/RemoteVideo.js 查看文件

@@ -89,7 +89,6 @@ function RemoteVideo(user, VideoLayout, emitter) {
89 89
     this._stopRemoteControl = this._stopRemoteControl.bind(this);
90 90
 
91 91
     this.container.onclick = this._onContainerClick;
92
-    this.container.ondblclick = this._onContainerDoubleClick;
93 92
 }
94 93
 
95 94
 RemoteVideo.prototype = Object.create(SmallVideo.prototype);

+ 1
- 28
modules/UI/videolayout/SmallVideo.js 查看文件

@@ -144,7 +144,6 @@ function SmallVideo(VideoLayout) {
144 144
     this.updateView = this.updateView.bind(this);
145 145
 
146 146
     this._onContainerClick = this._onContainerClick.bind(this);
147
-    this._onContainerDoubleClick = this._onContainerDoubleClick.bind(this);
148 147
 }
149 148
 
150 149
 /**
@@ -859,20 +858,6 @@ SmallVideo.prototype.updateIndicators = function() {
859 858
     );
860 859
 };
861 860
 
862
-/**
863
- * Callback invoked when the thumbnail is double clicked. Will pin the
864
- * participant if in tile view.
865
- *
866
- * @param {MouseEvent} event - The click event to intercept.
867
- * @private
868
- * @returns {void}
869
- */
870
-SmallVideo.prototype._onContainerDoubleClick = function(event) {
871
-    if (this._pinningRequiresDoubleClick() && this._shouldTriggerPin(event)) {
872
-        APP.store.dispatch(pinParticipant(this.id));
873
-    }
874
-};
875
-
876 861
 /**
877 862
  * Callback invoked when the thumbnail is clicked and potentially trigger
878 863
  * pinning of the participant.
@@ -882,8 +867,7 @@ SmallVideo.prototype._onContainerDoubleClick = function(event) {
882 867
  * @returns {void}
883 868
  */
884 869
 SmallVideo.prototype._onContainerClick = function(event) {
885
-    const triggerPin = this._shouldTriggerPin(event)
886
-        && !this._pinningRequiresDoubleClick();
870
+    const triggerPin = this._shouldTriggerPin(event);
887 871
 
888 872
     if (event.stopPropagation && triggerPin) {
889 873
         event.stopPropagation();
@@ -934,17 +918,6 @@ SmallVideo.prototype.togglePin = function() {
934 918
     APP.store.dispatch(pinParticipant(participantIdToPin));
935 919
 };
936 920
 
937
-/**
938
- * Returns whether or not clicking to pin the participant needs to be a double
939
- * click instead of a single click.
940
- *
941
- * @private
942
- * @returns {boolean}
943
- */
944
-SmallVideo.prototype._pinningRequiresDoubleClick = function() {
945
-    return shouldDisplayTileView(APP.store.getState());
946
-};
947
-
948 921
 /**
949 922
  * Removes the React element responsible for showing connection status, dominant
950 923
  * speaker, and raised hand icons.

Loading…
取消
儲存