@@ -49,6 +49,16 @@ import {FormsModule} from '@angular/forms';
49
49
import { Platform} from '@angular/cdk/platform' ;
50
50
import { MatSnackBarModule , MatSnackBar } from '@angular/material/snack-bar' ;
51
51
import { SignalsTabComponent } from './signals-view/signals-tab.component' ;
52
+ import {
53
+ Direction ,
54
+ ResponsiveSplitConfig ,
55
+ ResponsiveSplitDirective ,
56
+ } from '../../shared/responsive-split/responsive-split.directive' ;
57
+
58
+ const FOREST_VER_SPLIT_SIZE = 30 ;
59
+ const SIGNAL_GRAPH_VER_SPLIT_SIZE = 70 ;
60
+
61
+ const HOR_SPLIT_SIZE = 50 ;
52
62
53
63
const sameDirectives = ( a : IndexedNode , b : IndexedNode ) => {
54
64
if ( ( a . component && ! b . component ) || ( ! a . component && b . component ) ) {
@@ -86,6 +96,7 @@ const sameDirectives = (a: IndexedNode, b: IndexedNode) => {
86
96
FormsModule ,
87
97
MatSnackBarModule ,
88
98
SignalsTabComponent ,
99
+ ResponsiveSplitDirective ,
89
100
] ,
90
101
<
8000
/td>} )
91
102
export class DirectiveExplorerComponent {
@@ -122,6 +133,15 @@ export class DirectiveExplorerComponent {
122
133
private readonly platform = inject ( Platform ) ;
123
134
private readonly snackBar = inject ( MatSnackBar ) ;
124
135
136
+ protected readonly responsiveSplitConfig : ResponsiveSplitConfig = {
137
+ defaultDirection : 'vertical' ,
138
+ aspectRatioBreakpoint : 1.5 ,
139
+ breakpointDirection : 'horizontal' ,
140
+ } ;
141
+
142
+ protected readonly forestSplitSize = signal < number > ( FOREST_VER_SPLIT_SIZE ) ;
143
+ protected readonly signalGraphSplitSize = signal < number > ( SIGNAL_GRAPH_VER_SPLIT_SIZE ) ;
144
+
125
145
constructor ( ) {
126
146
afterRenderEffect ( ( cleanup ) => {
127
147
const splitElement = this . splitElementRef ( ) . nativeElement ;
@@ -351,4 +371,14 @@ export class DirectiveExplorerComponent {
351
371
// TBD: Use the node argument for graph node selection/highlighting.
352
372
this . signalsOpen . set ( true ) ;
353
373
}
374
+
375
+ onResponsiveSplitDirChange ( direction : Direction ) {
376
+ if ( direction === 'vertical' ) {
377
+ this . forestSplitSize . set ( FOREST_VER_SPLIT_SIZE ) ;
378
+ this . signalGraphSplitSize . set ( SIGNAL_GRAPH_VER_SPLIT_SIZE ) ;
379
+ } else {
380
+ this . forestSplitSize . set ( HOR_SPLIT_SIZE ) ;
381
+ this . signalGraphSplitSize . set ( HOR_SPLIT_SIZE ) ;
382
+ }
383
+ }
354
384
}
0 commit comments