#
luxiaotao1123
2024-10-11 85c7552bcc838661591b5e78dfdd341f7e3748b3
#
2个文件已修改
8 ■■■■ 已修改文件
zy-acs-flow/src/map/settings/MapSettings.jsx 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/settings/index.jsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/settings/MapSettings.jsx
@@ -17,6 +17,7 @@
import MuiInput from '@mui/material/Input';
import { useTranslate } from 'react-admin';
import * as Tool from '../tool';
import ConfirmButton from '../../page/components/ConfirmButton';
const MapSettings = (props) => {
    const { sprite, setSpriteSettings, onSubmit } = props;
@@ -31,11 +32,9 @@
            rotation: (sprite?.rotation * 180) / Math.PI || 0,
            copyDirection: 'right',
            copyCount: 1,
            // 其他默认值...
        },
    });
    // 监听所有字段的变化
    const watchAllFields = watch();
    useEffect(() => {
@@ -46,12 +45,10 @@
                scaleX: sprite.scale.x,
                scaleY: sprite.scale.y,
                rotation: (sprite.rotation * 180) / Math.PI,
                // 设置其他字段的初始值
            });
        }
    }, [sprite, reset]);
    // 更新精灵属性的函数
    const updateSprite = (data) => {
        if (sprite) {
            sprite.position.x = data.x;
@@ -59,7 +56,6 @@
            sprite.scale.x = data.scaleX;
            sprite.scale.y = data.scaleY;
            sprite.rotation = (data.rotation * Math.PI) / 180;
            // 更新其他属性...
        }
    };
@@ -337,6 +333,7 @@
                        }}>
                            {translate('ra.action.delete')}
                        </Button>
                        {/* <ConfirmButton /> */}
                    </Stack>
                </Grid>
            </Grid>
zy-acs-flow/src/map/settings/index.jsx
@@ -79,7 +79,6 @@
                                                sprite={sprite}
                                                setSpriteSettings={setSpriteSettings}
                                                onSubmit={() => {
                                                    alert('MapSettings')
                                                }}
                                            />
                                        )}