Skip to content

Commit 82c49c8

Browse files
committed
🥚 秘籍键增加对连线端点的调整功能
1 parent 0e3c89d commit 82c49c8

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

app/src/core/service/controlService/secretKeysEngine/secretKeysEngine.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import { TextRiseEffect } from "../../feedbackService/effectEngine/concrete/Text
2323
import { ViewFlashEffect } from "../../feedbackService/effectEngine/concrete/ViewFlashEffect";
2424
import { AutoLayoutFastTree } from "../autoLayoutEngine/autoLayoutFastTreeMode";
2525
import { LayoutManualAlignManager } from "../../../stage/stageManager/concreteMethods/layoutManager/layoutManualAlignManager";
26+
import { Direction } from "../../../../types/directions";
2627

2728
interface SecretKeyItem {
2829
name: string;
@@ -182,31 +183,39 @@ export class SecretKeysEngine {
182183
},
183184
},
184185
"8 8": {
185-
name: "顶部对齐",
186+
name: "将选中实体顶部对齐,选中的连线从源实体的顶边缘射出,到目标实体底边缘结束",
186187
explain: "小键盘的向上",
187188
func() {
188189
LayoutManualAlignManager.alignTop();
190+
StageManager.changeSelectedEdgeConnectLocation(Direction.Up, true);
191+
StageManager.changeSelectedEdgeConnectLocation(Direction.Down);
189192
},
190193
},
191194
"2 2": {
192-
name: "底部对齐",
195+
name: "将选中实体底部对齐,选中的连线从源实体的底边缘射出,到目标实体顶边缘结束",
193196
explain: "小键盘的向下",
194197
func() {
195198
LayoutManualAlignManager.alignBottom();
199+
StageManager.changeSelectedEdgeConnectLocation(Direction.Down, true);
200+
StageManager.changeSelectedEdgeConnectLocation(Direction.Up);
196201
},
197202
},
198203
"4 4": {
199-
name: "左侧对齐",
204+
name: "将选中实体左侧对齐,选中的连线从源实体的左边缘射出,到目标实体右边缘结束",
200205
explain: "小键盘的向左",
201206
func() {
202207
LayoutManualAlignManager.alignLeft();
208+
StageManager.changeSelectedEdgeConnectLocation(Direction.Left, true);
209+
StageManager.changeSelectedEdgeConnectLocation(Direction.Right);
203210
},
204211
},
205212
"6 6": {
206-
name: "右侧对齐",
213+
name: "将选中实体右侧对齐,选中的连线从源实体的右边缘射出,到目标实体左边缘结束",
207214
explain: "小键盘的向右",
208215
func() {
209216
LayoutManualAlignManager.alignRight();
217+
StageManager.changeSelectedEdgeConnectLocation(Direction.Right, true);
218+
StageManager.changeSelectedEdgeConnectLocation(Direction.Left);
210219
},
211220
},
212221
"4 6 4 6": {

0 commit comments

Comments
 (0)