Merge pull request #6025 from BobakOftadeh/chat-width-increased-window
Extended the Width of the Chat Area
This commit is contained in:
commit
fd02b04a2d
@ -227,12 +227,9 @@ class App extends Component {
|
|||||||
const { chat } = this.props;
|
const { chat } = this.props;
|
||||||
|
|
||||||
// Variables for resizing chat.
|
// Variables for resizing chat.
|
||||||
const CHAT_MIN_WIDTH_PX = 180;
|
const CHAT_MIN_WIDTH = '10%';
|
||||||
const CHAT_MAX_WIDTH_PX = 310;
|
const CHAT_MAX_WIDTH = '25%';
|
||||||
const CHAT_DEFAULT_WIDTH_RELATIVE = 25;
|
const CHAT_DEFAULT_WIDTH = '15%';
|
||||||
|
|
||||||
// decide whether using pixel or percentage unit as a default width for chat
|
|
||||||
const CHAT_DEFAULT_WIDTH = (window.innerWidth * (CHAT_DEFAULT_WIDTH_RELATIVE / 100.0)) < CHAT_MAX_WIDTH_PX ? `${CHAT_DEFAULT_WIDTH_RELATIVE}%` : CHAT_MAX_WIDTH_PX;
|
|
||||||
|
|
||||||
if (!chat) return null;
|
if (!chat) return null;
|
||||||
|
|
||||||
@ -250,8 +247,8 @@ class App extends Component {
|
|||||||
return (
|
return (
|
||||||
<Resizable
|
<Resizable
|
||||||
defaultSize={{ width: CHAT_DEFAULT_WIDTH }}
|
defaultSize={{ width: CHAT_DEFAULT_WIDTH }}
|
||||||
minWidth={CHAT_MIN_WIDTH_PX}
|
minWidth={CHAT_MIN_WIDTH}
|
||||||
maxWidth={CHAT_MAX_WIDTH_PX}
|
maxWidth={CHAT_MAX_WIDTH}
|
||||||
ref={(node) => { this.resizableChat = node; }}
|
ref={(node) => { this.resizableChat = node; }}
|
||||||
className={styles.resizableChat}
|
className={styles.resizableChat}
|
||||||
enable={resizableEnableOptions}
|
enable={resizableEnableOptions}
|
||||||
|
Loading…
Reference in New Issue
Block a user