You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Add ref to callViewWrapper
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React, { createRef } from 'react';
|
||||||
|
|
||||||
import CallView from "./CallView";
|
import CallView from "./CallView";
|
||||||
import RoomViewStore from '../../../stores/RoomViewStore';
|
import RoomViewStore from '../../../stores/RoomViewStore';
|
||||||
@@ -122,6 +122,8 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private callViewWrapper = createRef<HTMLDivElement>();
|
||||||
|
|
||||||
private initX = 0;
|
private initX = 0;
|
||||||
private initY = 0;
|
private initY = 0;
|
||||||
private lastX = DEFAULT_X_OFFSET;
|
private lastX = DEFAULT_X_OFFSET;
|
||||||
@@ -230,7 +232,11 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx_CallPreview" style={style}>
|
<div
|
||||||
|
className="mx_CallPreview"
|
||||||
|
style={style}
|
||||||
|
ref={this.callViewWrapper}
|
||||||
|
>
|
||||||
<CallView
|
<CallView
|
||||||
call={this.state.primaryCall}
|
call={this.state.primaryCall}
|
||||||
secondaryCall={this.state.secondaryCall}
|
secondaryCall={this.state.secondaryCall}
|
||||||
|
|||||||
Reference in New Issue
Block a user