mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
Wire up dragging
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
f64a950195
commit
11222e7a46
1 changed files with 19 additions and 1 deletions
|
@ -209,8 +209,26 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
|||
|
||||
public render() {
|
||||
if (this.state.primaryCall) {
|
||||
const translatePixelsX = this.state.translationX + "px";
|
||||
const translatePixelsY = this.state.translationY + "px";
|
||||
const style = {
|
||||
transform: `translateX(${translatePixelsX})
|
||||
translateY(${translatePixelsY})`,
|
||||
};
|
||||
|
||||
return (
|
||||
<CallView call={this.state.primaryCall} secondaryCall={this.state.secondaryCall} pipMode={true} />
|
||||
<div className="mx_CallPreview" style={style}>
|
||||
<CallView
|
||||
call={this.state.primaryCall}
|
||||
secondaryCall={this.state.secondaryCall}
|
||||
pipMode={true}
|
||||
dragCallbacks={{
|
||||
onStartMoving: this.onStartMoving,
|
||||
onMoving: this.onMoving,
|
||||
onEndMoving: this.onEndMoving,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue