Browse Source

fix:宽高设置

ananzhusen 7 months ago
parent
commit
5fe0c36855
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/views/components/PenProps.vue

+ 3 - 1
src/views/components/PenProps.vue

@@ -1530,7 +1530,9 @@ const changeID = (value: any) => {
 };
 };
 
 
 const changeRectValue = (prop: string) => {
 const changeRectValue = (prop: string) => {
-  data.rect[prop] = data.rect[prop]||1;
+  if(['width','height'].includes(prop)){
+    data.rect[prop] = data.rect[prop]||1;
+  }
   if(data.pen.parentId){
   if(data.pen.parentId){
     if(['x','y','width','height'].includes(prop)){
     if(['x','y','width','height'].includes(prop)){
       const scale = meta2d.store.data.scale;
       const scale = meta2d.store.data.scale;