mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2025-01-03 08:33:48 +01:00
fix height
This commit is contained in:
parent
c087070ca5
commit
72667791cd
@ -9,6 +9,9 @@ import injectSheet from 'react-jss';
|
|||||||
import ReactResizeDetector from 'react-resize-detector';
|
import ReactResizeDetector from 'react-resize-detector';
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
|
container: {
|
||||||
|
height: '100%'
|
||||||
|
},
|
||||||
canvas: {
|
canvas: {
|
||||||
position: 'absolute'
|
position: 'absolute'
|
||||||
}
|
}
|
||||||
@ -55,7 +58,7 @@ class DoodlePreview extends React.Component {
|
|||||||
const { classes } = this.props;
|
const { classes } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div className={classes.container}>
|
||||||
<ReactResizeDetector handleWidth handleHeight onResize={this.onResize} />
|
<ReactResizeDetector handleWidth handleHeight onResize={this.onResize} />
|
||||||
<canvas className={classes.canvas} ref="canvas" />
|
<canvas className={classes.canvas} ref="canvas" />
|
||||||
</div>
|
</div>
|
||||||
@ -69,7 +72,6 @@ DoodlePreview.defaultProps = {
|
|||||||
};
|
};
|
||||||
DoodlePreview.propTypes = {
|
DoodlePreview.propTypes = {
|
||||||
classes: PropTypes.objectOf(PropTypes.string),
|
classes: PropTypes.objectOf(PropTypes.string),
|
||||||
className: PropTypes.string,
|
|
||||||
width: PropTypes.number.isRequired,
|
width: PropTypes.number.isRequired,
|
||||||
height: PropTypes.number.isRequired,
|
height: PropTypes.number.isRequired,
|
||||||
pixelRatio: PropTypes.number.isRequired,
|
pixelRatio: PropTypes.number.isRequired,
|
||||||
|
Loading…
Reference in New Issue
Block a user