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() {
|
public render() {
|
||||||
if (this.state.primaryCall) {
|
if (this.state.primaryCall) {
|
||||||
|
const translatePixelsX = this.state.translationX + "px";
|
||||||
|
const translatePixelsY = this.state.translationY + "px";
|
||||||
|
const style = {
|
||||||
|
transform: `translateX(${translatePixelsX})
|
||||||
|
translateY(${translatePixelsY})`,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
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