|
@@ -21,16 +21,15 @@
|
|
|
<script setup lang="ts">
|
|
|
import { ref } from "vue";
|
|
|
import { BoardShape } from "../board";
|
|
|
-import { ElSlider } from "element-plus";
|
|
|
|
|
|
const props = defineProps<{ shape: BoardShape }>();
|
|
|
const emit = defineEmits<{ (e: "blur"): void }>();
|
|
|
const value = ref<number>(props.shape.data.rotate);
|
|
|
const setRotate = (edg: number, save: boolean) => {
|
|
|
- // if (save || edg !== value.value) {
|
|
|
- // edg = edg || 0;
|
|
|
- // value.value = edg;
|
|
|
- props.shape.setRotate(edg, true);
|
|
|
- // }
|
|
|
+ if (edg !== value.value) {
|
|
|
+ edg = edg || 0;
|
|
|
+ value.value = edg;
|
|
|
+ props.shape.setRotate(edg, true);
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|