@@ -80,7 +80,7 @@ export class TextNodeRenderer {
8080 ) ;
8181 }
8282 // 渲染键盘树形模式方向提示(仅在键盘操作模式下且非编辑状态时显示)
83- if ( this . project . keyboardOnlyEngine . isOpenning ( ) && ! node . isEditing ) {
83+ if ( this . project . keyboardOnlyEngine . isOpenning ( ) && ! node . isEditing && Settings . showTreeDirectionHint ) {
8484 this . renderKeyboardTreeHint ( node ) ;
8585 }
8686 }
@@ -171,6 +171,30 @@ export class TextNodeRenderer {
171171 this . project . textRenderer . renderTextFromCenter ( key , viewPos , 13 * this . project . camera . currentScale , hintColor ) ;
172172 }
173173 }
174+
175+ // 反斜杠(\)广度生长:在父节点方向确定的新兄弟节点预测位置画一个虚框
176+ // onBroadGenerateNode 创建的是父节点的新子节点(当前选中节点的兄弟)
177+ // 父节点方向 left/right → 新兄弟在当前节点下方
178+ // 父节点方向 up/down → 新兄弟在当前节点右侧
179+ const parents = this . project . graphMethods . nodeParentArray ( node ) ;
180+ if ( parents . length === 1 ) {
181+ const parentNode = parents [ 0 ] ;
182+ const parentDirection = this . project . keyboardOnlyTreeEngine . getNodePreDirection ( parentNode ) ;
183+ const SIBLING_GAP = 10 ;
184+ let previewLocation : Vector ;
185+ if ( parentDirection === "right" || parentDirection === "left" ) {
186+ previewLocation = rect . leftBottom . add ( new Vector ( 0 , SIBLING_GAP ) ) ;
187+ } else {
188+ previewLocation = rect . rightTop . add ( new Vector ( SIBLING_GAP , 0 ) ) ;
189+ }
190+ const previewCenter = previewLocation . add ( new Vector ( rect . width / 2 , rect . height / 2 ) ) ;
191+ this . project . textRenderer . renderTextFromCenter (
192+ "backslash \\" ,
193+ this . project . renderer . transformWorld2View ( previewCenter ) ,
194+ 10 * this . project . camera . currentScale ,
195+ hintColor ,
196+ ) ;
197+ }
174198 }
175199
176200 /**
0 commit comments