diff --git a/src/content/components/TranslatePanel.js b/src/content/components/TranslatePanel.js index 9da01eb..45809c4 100644 --- a/src/content/components/TranslatePanel.js +++ b/src/content/components/TranslatePanel.js @@ -86,8 +86,9 @@ export default class TranslatePanel extends Component { }; calcSize = () => { + const maxWidth = parseInt(getSettings("width")); const wrapper = ReactDOM.findDOMNode(this.refs.wrapper); - const wrapperWidth = wrapper.clientWidth; + const wrapperWidth = wrapper.clientWidth < maxWidth ? wrapper.clientWidth + 1 : maxWidth; const wrapperHeight = wrapper.clientHeight; return { panelWidth: wrapperWidth, panelHeight: wrapperHeight }; };