Add viewall flag to openscad cli in prep for zoom to fit for scad previews

This commit is contained in:
Kurt Hutten
2021-10-17 10:15:33 +11:00
parent cd90c3ce49
commit 35d55074bd
8 changed files with 115 additions and 26 deletions

View File

@@ -18,12 +18,13 @@ export const use3dViewerResize = () => {
})
thunkDispatch((dispatch, getState) => {
const state = getState()
if (['png', 'INIT'].includes(state.objectData?.type)) {
if (state.objectData?.type === 'png') {
dispatch({ type: 'setLoading' })
requestRender({
state,
dispatch,
viewerSize: { width, height },
viewAll: state.objectData?.type === 'INIT',
})
}
})