Merge pull request #10 from sensebox/use-viewport-height

use viewport height for blocklywindow
This commit is contained in:
Mario Pesch 2020-10-05 07:21:44 +00:00 committed by GitHub
commit c99ca92a4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 33 deletions

View File

@ -85,7 +85,7 @@ class CodeViewer extends Component {
var curlyBrackets = '{ }';
var unequal = '<>';
return (
<Card style={{height: '100%', maxHeight: '500px'}} ref={this.myDiv}>
<Card style={{ height: '100%', maxHeight: '80vH' }} ref={this.myDiv}>
<Accordion
square={true}
style={{ margin: 0 }}

View File

@ -87,7 +87,7 @@ class Home extends Component {
</IconButton>
</Tooltip>
<TrashcanButtons />
<BlocklyWindow blocklyCSS={{height: '500px'}} blockDisabled/>
<BlocklyWindow blocklyCSS={{ height: '80vH' }} blockDisabled />
</Grid>
{this.state.codeOn ?
<Grid item xs={12} md={6}>

View File

@ -42,7 +42,7 @@ class Assessment extends Component {
<BlocklyWindow
initialXml={statusTask ? statusTask.xml ? statusTask.xml : null : null}
blockDisabled
blocklyCSS={{height: '500px'}}
blocklyCSS={{ height: '65vH' }}
/>
</Grid>
<Grid item xs={12} md={6} lg={4} style={isWidthDown('sm', this.props.width) ? { height: 'max-content' } : {}}>