Browse Source

refactor(editor): 暂时移除角度转换逻辑

- 注释掉了 TransformEditor 组件中的角度转换代码
- 删除了对 Typeof 类型的导入
- 保留了原始逻辑,以便未来可能的恢复
master
lizw-2015 6 months ago
parent
commit
fe8e4d2d3a
  1. 12
      src/editor/propEditors/TransformEditor.vue

12
src/editor/propEditors/TransformEditor.vue

@ -1,7 +1,6 @@
<script setup lang="ts">
import { reactive } from "vue";
import { ElInputNumber, useFormItem } from "element-plus";
import { Typeof } from "@ease-forge/shared";
import { renderIcon } from "@/utils/webutils.js";
defineOptions({
@ -69,9 +68,9 @@ function getPosition(idx: 0 | 1 | 2) {
}
function getRotation(idx: 0 | 1 | 2) {
const radian = props.modelValue?.[1]?.[idx];
if (Typeof.noValue(radian)) return;
return Math.round(radian * 180 / Math.PI);
return props.modelValue?.[1]?.[idx];
// if (Typeof.noValue(radian)) return;
// return Math.round(radian * 180 / Math.PI);
}
function getScale(idx: 0 | 1 | 2) {
@ -79,8 +78,9 @@ function getScale(idx: 0 | 1 | 2) {
}
function calcRotation(rotation?: number) {
if (Typeof.noValue(rotation)) return;
return rotation * Math.PI / 180;
return rotation;
// if (Typeof.noValue(rotation)) return;
// return rotation * Math.PI / 180;
}
interface TransformEditorExpose {

Loading…
Cancel
Save