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 { render } from 'react-dom';
|
||||||
import fileSaver from 'file-saver';
|
import fileSaver from 'file-saver';
|
||||||
|
|
||||||
|
document.body.style.margin = 0;
|
||||||
|
document.body.style.padding = 0;
|
||||||
|
|
||||||
const downloadGCode = gcode => {
|
const downloadGCode = gcode => {
|
||||||
const file = new File([gcode], 'gcode.gcode', { type: 'text/plain' });
|
const file = new File([gcode], 'gcode.gcode', { type: 'text/plain' });
|
||||||
fileSaver.saveAs(file);
|
fileSaver.saveAs(file);
|
||||||
@ -13,9 +16,11 @@ const downloadGCode = gcode => {
|
|||||||
const jsonLoader = new THREE.JSONLoader();
|
const jsonLoader = new THREE.JSONLoader();
|
||||||
jsonLoader.load(fileURL, geometry => {
|
jsonLoader.load(fileURL, geometry => {
|
||||||
render((
|
render((
|
||||||
<div style={{ position: 'absolute', border: '1px solid black' }}>
|
<div>
|
||||||
<Interface
|
<Interface
|
||||||
geometry={geometry}
|
geometry={geometry}
|
||||||
|
width={window.innerWidth}
|
||||||
|
height={window.innerHeight}
|
||||||
onCompleteActions={[{ title: 'Download', callback: downloadGCode }]}
|
onCompleteActions={[{ title: 'Download', callback: downloadGCode }]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user