mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-26 07:24:57 +01:00
hide buttons bar when sliced
This commit is contained in:
parent
624a178bb2
commit
4654858c3e
@ -49,6 +49,7 @@ class Interface extends React.Component {
|
|||||||
};
|
};
|
||||||
state = {
|
state = {
|
||||||
controlMode: 'translate',
|
controlMode: 'translate',
|
||||||
|
sliced: false
|
||||||
};
|
};
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -113,18 +114,19 @@ class Interface extends React.Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { width, height, classes } = this.props;
|
const { width, height, classes } = this.props;
|
||||||
|
const { sliced } = this.state;
|
||||||
return (
|
return (
|
||||||
<div style={{ width, height }} className={classes.container}>
|
<div style={{ width, height }} className={classes.container}>
|
||||||
<canvas className={classes.canvas} ref="canvas" width={width} height={height} />
|
<canvas className={classes.canvas} ref="canvas" width={width} height={height} />
|
||||||
<div className={classes.controlBar}>
|
{!sliced && <div className={classes.controlBar}>
|
||||||
<button onClick={this.resetMesh}>Reset</button>
|
<button onClick={this.resetMesh}>Reset</button>
|
||||||
<button onClick={() => this.setState({ controlMode: 'translate' })}>Translate</button>
|
<button onClick={() => this.setState({ controlMode: 'translate' })}>Translate</button>
|
||||||
<button onClick={() => this.setState({ controlMode: 'rotate' })}>Rotate</button>
|
<button onClick={() => this.setState({ controlMode: 'rotate' })}>Rotate</button>
|
||||||
<button onClick={() => this.setState({ controlMode: 'scale' })}>Scale</button>
|
<button onClick={() => this.setState({ controlMode: 'scale' })}>Scale</button>
|
||||||
</div>
|
</div>}
|
||||||
<div className={classes.sliceBar}>
|
{!sliced && <div className={classes.sliceBar}>
|
||||||
<button onClick={this.slice}>Slice</button>
|
<button onClick={this.slice}>Slice</button>
|
||||||
</div>
|
</div>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user