import { useRender, } from 'src/components/IdeWrapper/useRender' import { useIdeContext } from 'src/helpers/hooks/useIdeContext' import { genParams, getParams } from 'src/helpers/cadPackages/jscadParams' const Customizer = () => { const [open, setOpen] = React.useState(true) const ref = React.useRef() const jsCadCustomizerElement = ref.current const { state } = useIdeContext() const customizerParams = state?.objectData?.customizerParams const lastParameters = state?.objectData?.lastParameters const handleRender = useRender() const handleRender2 = ()=>handleRender(getParams(ref.current)) React.useEffect(() => { console.log({ jsCadCustomizerElement, customizerParams, lastParameters }) if (jsCadCustomizerElement && customizerParams) { genParams(customizerParams, jsCadCustomizerElement, lastParameters || {}, (values, source)=>{ console.log('change source', source) if(source === 'group'){ // save to local storage but do not render return } handleRender(values) },[]) } }, [jsCadCustomizerElement, customizerParams, lastParameters]) return (
Parameters

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

lots of lines should cause scroll

) } export default Customizer