浏览代码

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
     this.updateDisplayName();
22
     this.updateDisplayName();
23
 
23
 
24
     this.container.onclick = this._onContainerClick;
24
     this.container.onclick = this._onContainerClick;
25
-    this.container.ondblclick = this._onContainerDoubleClick;
26
 }
25
 }
27
 SharedVideoThumb.prototype = Object.create(SmallVideo.prototype);
26
 SharedVideoThumb.prototype = Object.create(SmallVideo.prototype);
28
 SharedVideoThumb.prototype.constructor = SharedVideoThumb;
27
 SharedVideoThumb.prototype.constructor = SharedVideoThumb;

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

62
     this.updateIndicators();
62
     this.updateIndicators();
63
 
63
 
64
     this.container.onclick = this._onContainerClick;
64
     this.container.onclick = this._onContainerClick;
65
-    this.container.ondblclick = this._onContainerDoubleClick;
66
 }
65
 }
67
 
66
 
68
 LocalVideo.prototype = Object.create(SmallVideo.prototype);
67
 LocalVideo.prototype = Object.create(SmallVideo.prototype);

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

89
     this._stopRemoteControl = this._stopRemoteControl.bind(this);
89
     this._stopRemoteControl = this._stopRemoteControl.bind(this);
90
 
90
 
91
     this.container.onclick = this._onContainerClick;
91
     this.container.onclick = this._onContainerClick;
92
-    this.container.ondblclick = this._onContainerDoubleClick;
93
 }
92
 }
94
 
93
 
95
 RemoteVideo.prototype = Object.create(SmallVideo.prototype);
94
 RemoteVideo.prototype = Object.create(SmallVideo.prototype);

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

144
     this.updateView = this.updateView.bind(this);
144
     this.updateView = this.updateView.bind(this);
145
 
145
 
146
     this._onContainerClick = this._onContainerClick.bind(this);
146
     this._onContainerClick = this._onContainerClick.bind(this);
147
-    this._onContainerDoubleClick = this._onContainerDoubleClick.bind(this);
148
 }
147
 }
149
 
148
 
150
 /**
149
 /**
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
  * Callback invoked when the thumbnail is clicked and potentially trigger
862
  * Callback invoked when the thumbnail is clicked and potentially trigger
878
  * pinning of the participant.
863
  * pinning of the participant.
882
  * @returns {void}
867
  * @returns {void}
883
  */
868
  */
884
 SmallVideo.prototype._onContainerClick = function(event) {
869
 SmallVideo.prototype._onContainerClick = function(event) {
885
-    const triggerPin = this._shouldTriggerPin(event)
886
-        && !this._pinningRequiresDoubleClick();
870
+    const triggerPin = this._shouldTriggerPin(event);
887
 
871
 
888
     if (event.stopPropagation && triggerPin) {
872
     if (event.stopPropagation && triggerPin) {
889
         event.stopPropagation();
873
         event.stopPropagation();
934
     APP.store.dispatch(pinParticipant(participantIdToPin));
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
  * Removes the React element responsible for showing connection status, dominant
922
  * Removes the React element responsible for showing connection status, dominant
950
  * speaker, and raised hand icons.
923
  * speaker, and raised hand icons.

正在加载...
取消
保存