Fix dialog positioning

This commit is contained in:
IRBorisov 2024-05-10 15:28:33 +03:00
parent 00fe422711
commit 1316089fc9
3 changed files with 10 additions and 11 deletions

View File

@ -56,12 +56,17 @@ function Modal({
}; };
return ( return (
<> <div className='fixed top-0 left-0 w-full h-full z-modal'>
<div className={clsx('z-navigation', 'fixed top-0 left-0', 'w-full h-full', 'cc-modal-blur')} /> <div className={clsx('z-navigation', 'fixed top-0 left-0', 'w-full h-full', 'cc-modal-blur')} />
<div className={clsx('z-navigation', 'fixed top-0 left-0', 'w-full h-full', 'cc-modal-backdrop')} /> <div className={clsx('z-navigation', 'fixed top-0 left-0', 'w-full h-full', 'cc-modal-backdrop')} />
<motion.div <motion.div
ref={ref} ref={ref}
className={clsx('z-modal', 'fixed m-auto', 'border shadow-md', 'clr-app')} className={clsx(
'z-modal',
'absolute bottom-1/2 left-1/2 -translate-x-1/2 translate-y-1/2',
'border shadow-md',
'clr-app'
)}
initial={{ ...animateModal.initial }} initial={{ ...animateModal.initial }}
animate={{ ...animateModal.animate }} animate={{ ...animateModal.animate }}
exit={{ ...animateModal.exit }} exit={{ ...animateModal.exit }}
@ -107,7 +112,7 @@ function Modal({
/> />
</div> </div>
</motion.div> </motion.div>
</> </div>
); );
} }

View File

@ -61,13 +61,7 @@ function DlgShowAST({ hideWindow, syntaxTree, expression }: DlgShowASTProps) {
</div> </div>
) : null} ) : null}
</div> </div>
<div <div className='relative w-[calc(100vw-6rem-2px)] h-[calc(100vh-14rem-2px)]'>
className='relative'
style={{
width: 'calc(100vw - 6rem - 2px)',
height: 'calc(100vh - 14rem - 2px)'
}}
>
<GraphUI <GraphUI
animated={false} animated={false}
nodes={nodes} nodes={nodes}

View File

@ -46,7 +46,7 @@ function DlgUploadRSForm({ hideWindow }: DlgUploadRSFormProps) {
canSubmit={!!file} canSubmit={!!file}
onSubmit={handleSubmit} onSubmit={handleSubmit}
submitText='Загрузить' submitText='Загрузить'
className='w-[20rem] px-6' className='w-[25rem] px-6'
> >
<FileInput label='Выбрать файл' acceptType={EXTEOR_TRS_FILE} onChange={handleFile} /> <FileInput label='Выбрать файл' acceptType={EXTEOR_TRS_FILE} onChange={handleFile} />
<Checkbox <Checkbox