mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 13:37:58 +01:00
make interface fullscreen
This commit is contained in:
parent
3a09b93f46
commit
c65a5a3df4
@ -5,6 +5,9 @@ import fileURL from '!url-loader!./models/shape.json';
|
||||
import { render } from 'react-dom';
|
||||
import fileSaver from 'file-saver';
|
||||
|
||||
document.body.style.margin = 0;
|
||||
document.body.style.padding = 0;
|
||||
|
||||
const downloadGCode = gcode => {
|
||||
const file = new File([gcode], 'gcode.gcode', { type: 'text/plain' });
|
||||
fileSaver.saveAs(file);
|
||||
@ -13,9 +16,11 @@ const downloadGCode = gcode => {
|
||||
const jsonLoader = new THREE.JSONLoader();
|
||||
jsonLoader.load(fileURL, geometry => {
|
||||
render((
|
||||
<div style={{ position: 'absolute', border: '1px solid black' }}>
|
||||
<div>
|
||||
<Interface
|
||||
geometry={geometry}
|
||||
width={window.innerWidth}
|
||||
height={window.innerHeight}
|
||||
onCompleteActions={[{ title: 'Download', callback: downloadGCode }]}
|
||||
/>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user