瀏覽代碼

perfect_align

ananzhusen 2 年之前
父節點
當前提交
826d0227e6
共有 3 個文件被更改,包括 192 次插入206 次删除
  1. 179 203
      pnpm-lock.yaml
  2. 1 1
      src/views/components/Actions.vue
  3. 12 2
      src/views/components/PensProps.vue

File diff suppressed because it is too large
+ 179 - 203
pnpm-lock.yaml


+ 1 - 1
src/views/components/Actions.vue

@@ -399,7 +399,7 @@ const actionOptions = [
   },
   {
     label: '自定义函数',
-    value: 16,
+    value: 5,
   },
 ];
 

+ 12 - 2
src/views/components/PensProps.vue

@@ -864,11 +864,21 @@ const visible = (v: boolean) => {
 };
 
 const align = (align: string) => {
-  meta2d.alignNodes(align, meta2d.store.active);
+  if (align === 'h-distribute') {
+    meta2d.spaceBetween(meta2d.store.active);
+  } else if (align === 'v-distribute') {
+    meta2d.spaceBetweenColumn(meta2d.store.active);
+  } else {
+    meta2d.alignNodes(align, meta2d.store.active);
+  }
 };
 
 const align2 = (align: string) => {
-  meta2d.alignNodes(align, meta2d.store.active);
+  if (align === 'same-size') {
+    meta2d.beSameByLast(meta2d.store.active);
+  } else {
+    meta2d.alignNodesByLast(align, meta2d.store.active);
+  }
 };
 
 const changeValue = (prop: string) => {

Some files were not shown because too many files changed in this diff