Merge pull request #331 from manojVivek/bugfix/device-width-bug

Device width bug fix
This commit is contained in:
Manoj Vivek 2020-07-19 09:05:26 +05:30 committed by GitHub
commit 291e0e9517
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 9 deletions

View file

@ -662,7 +662,11 @@ class WebView extends Component {
screenshotInProgress,
} = this.state;
const deviceStyles = {
outline: `4px solid ${this.props.browser.userPreferences.deviceOutlineStyle}`,
outline: `4px solid ${
this._isDevToolsOpen()
? `#6075ef`
: this.props.browser.userPreferences.deviceOutlineStyle
}`,
width: deviceDimensions.width,
height: deviceDimensions.height,
};
@ -782,9 +786,7 @@ class WebView extends Component {
</div>
</div>
<div
className={cx(styles.deviceContainer, {
[styles.devToolsActive]: this._isDevToolsOpen(),
})}
className={cx(styles.deviceContainer)}
style={{
width: deviceStyles.width,
transform: `scale(${zoomLevel})`,

View file

@ -40,11 +40,6 @@
position: relative;
display: inline-flex;
transform-origin: top left;
border: 3px solid #687cee00;
}
.devToolsActive {
border: 3px solid #6075ef;
}
.device {