Disable resizing of userlist and chat for mobile
This commit is contained in:
parent
6922ab1c70
commit
7bf922c87b
@ -155,13 +155,26 @@ class App extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderUserListResizable() {
|
renderUserListResizable() {
|
||||||
|
const { userList } = this.props;
|
||||||
|
|
||||||
|
if (!userList) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Resizable
|
<Resizable
|
||||||
minWidth="10%"
|
minWidth="10%"
|
||||||
maxWidth="20%"
|
maxWidth="20%"
|
||||||
ref={(node) => { this.resizableUserList = node; }}
|
ref={(node) => { this.resizableUserList = node; }}
|
||||||
enable={{ right: true }}
|
|
||||||
className={styles.resizableUserList}
|
className={styles.resizableUserList}
|
||||||
|
enable={{
|
||||||
|
top: false,
|
||||||
|
right: true,
|
||||||
|
bottom: false,
|
||||||
|
left: false,
|
||||||
|
topRight: false,
|
||||||
|
bottomRight: false,
|
||||||
|
bottomLeft: false,
|
||||||
|
topLeft: false,
|
||||||
|
}}
|
||||||
onResize={(e, direction, ref) => {
|
onResize={(e, direction, ref) => {
|
||||||
if (e.clientX - ref.offsetLeft <= 50) this.props.router.push('/');
|
if (e.clientX - ref.offsetLeft <= 50) this.props.router.push('/');
|
||||||
}}
|
}}
|
||||||
@ -198,7 +211,16 @@ class App extends Component {
|
|||||||
maxWidth="30%"
|
maxWidth="30%"
|
||||||
ref={(node) => { this.resizableChat = node; }}
|
ref={(node) => { this.resizableChat = node; }}
|
||||||
className={styles.resizableChat}
|
className={styles.resizableChat}
|
||||||
enable={{ right: false }}
|
enable={{
|
||||||
|
top: false,
|
||||||
|
right: true,
|
||||||
|
bottom: false,
|
||||||
|
left: false,
|
||||||
|
topRight: false,
|
||||||
|
bottomRight: false,
|
||||||
|
bottomLeft: false,
|
||||||
|
topLeft: false,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{this.renderChat()}
|
{this.renderChat()}
|
||||||
</Resizable>
|
</Resizable>
|
||||||
|
Loading…
Reference in New Issue
Block a user