Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelescarabattoli committed Oct 4, 2023
1 parent 01e2934 commit 11ad6aa
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 52 deletions.
Binary file modified docs/assets/images/screen-main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/images/screen-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion frontend/src/components/controls/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Controls = ({
<Button onClick={onClickNextFile} text={<Icon name="chevron-right" />} accessKey="x" />
</Tooltip>
<Tooltip text="Open with external application">
<Button onClick={onClickOpenWith} text={<Icon name="external-link" />} accessKey="z" />
<Button onClick={onClickOpenWith} text={<Icon name="external-link" />} />
</Tooltip>
</>
) : <></>
Expand Down
44 changes: 0 additions & 44 deletions frontend/src/components/frame/index.js

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/src/components/frame/style.module.css

This file was deleted.

7 changes: 6 additions & 1 deletion frontend/src/pages/application/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const Application = () => {
const canvasRef = useRef(null);
const [cameraPosition, setCameraPosition] = useState([100, 100, 100])
const [settings, setSetting] = useState(parseSettings())
const orbitRef = useRef(null);

const readFile = toReadFile => {
const reader = new FileReader();
Expand Down Expand Up @@ -74,18 +75,22 @@ const Application = () => {
}

const onClickSideX = () => {
orbitRef?.current?.reset();
setCameraPosition(() => [0, 0, 100])
}

const onClickSideY = () => {
orbitRef?.current?.reset();
setCameraPosition(() => [0, 100, 0])
}

const onClickSideZ = () => {
orbitRef?.current?.reset();
setCameraPosition(() => [100, 0, 0])
}

const onClickResetPosition = () => {
orbitRef?.current?.reset();
setCameraPosition(() => [100, 100, 100])
}

Expand Down Expand Up @@ -140,7 +145,7 @@ const Application = () => {
<Suspense fallback={<></>}>
<Bed bedSize={settings.bedSize} cellSize={settings.bedGridCellSize} isVisible={settings.isBedVisible} color={settings.bedColor} />
{filePath ? <Model file={file} color={settings.modelColor} /> : <></>}
<OrbitControls enablePan={true} enableZoom={true} enableRotate={true} />
<OrbitControls enablePan={true} enableZoom={true} enableRotate={true} ref={orbitRef}/>
<Helpers cameraPosition={cameraPosition} isAxesVisible={settings.isAxesVisible} />
</Suspense>
</Canvas>
Expand Down

0 comments on commit 11ad6aa

Please sign in to comment.