1
1
import { Component , HostBinding , Input , ElementRef , Output , EventEmitter } from '@angular/core' ;
2
2
3
3
/**
4
- * Provides reference to `SplitPaneComponent` component.
5
- * Represents individual resizable panes. Users can control the resize behavior via the min and max size properties.
6
- * @export
7
- * @class SplitPaneComponent
4
+ * Represents individual resizable/collapsible panes.
5
+ * @igxModule IgxSplitterModule
6
+ *
7
+ * @igxParent IgxSplitterComponent
8
+ *
9
+ * @igxKeywords pane
10
+ *
11
+ * @igxGroup presentation
12
+ *
13
+ * @remarks
14
+ * Users can control the resize behavior via the min and max size properties.
8
15
*/
9
16
@Component ( {
10
17
selector : 'igx-splitter-pane' ,
@@ -14,10 +21,18 @@ export class IgxSplitterPaneComponent {
14
21
15
22
private _size = 'auto' ;
16
23
private _collapsed = false ;
24
+
25
+ /** @hidden @internal */
17
26
public owner ;
18
27
19
28
/**
20
- * Sets/gets the size of the current `IgxSplitterPaneComponent`.
29
+ * Gets/Sets the size of the current pane.
30
+ * * @example
31
+ * ```html
32
+ * <igx-splitter>
33
+ * <igx-splitter-pane [size]='size'>...</igx-splitter-pane>
34
+ * </igx-splitter>
35
+ * ```
21
36
*/
22
37
@Input ( )
23
38
get size ( ) {
@@ -30,25 +45,51 @@ export class IgxSplitterPaneComponent {
30
45
}
31
46
32
47
/**
33
- * Sets/gets the minimum allowable size of the current `IgxSplitterPaneComponent`.
48
+ * Gets/Sets the minimum allowed size of the current pane.
49
+ * @example
50
+ * ```html
51
+ * <igx-splitter>
52
+ * <igx-splitter-pane [minSize]='minSize'>...</igx-splitter-pane>
53
+ * </igx-splitter>
54
+ * ```
34
55
*/
35
56
@Input ( )
36
57
public minSize ! : string ;
37
58
38
59
/**
39
- * Sets/gets the maximum allowable size of the current `IgxSplitterPaneComponent`.
60
+ * Gets/Set the maximum allowed size of the current pane.
61
+ * @example
62
+ * ```html
63
+ * <igx-splitter>
64
+ * <igx-splitter-pane [maxSize]='maxSize'>...</igx-splitter-pane>
65
+ * </igx-splitter>
66
+ * ```
40
67
*/
41
68
@Input ( )
42
69
public maxSize ! : string ;
43
70
44
71
/**
45
- * Sets/Gets whether pane is resizable.
72
+ * Gets/Sets whether pane is resizable.
73
+ * @example
74
+ * ```html
75
+ * <igx-splitter>
76
+ * <igx-splitter-pane [resizable]='false'>...</igx-splitter-pane>
77
+ * </igx-splitter>
78
+ * ```
79
+ * @remarks
80
+ * If pane is not resizable its related splitter bar cannot be dragged.
46
81
*/
47
82
@Input ( )
48
83
public resizable = true ;
49
84
50
85
/**
51
86
* Event fired when collapsed state of pane is changed.
87
+ * @example
88
+ * ```html
89
+ * <igx-splitter>
90
+ * <igx-splitter-pane (onToggle)='onPaneToggle($event)'>...</igx-splitter-pane>
91
+ * </igx-splitter>
92
+ * ```
52
93
*/
53
94
@Output ( )
54
95
public onToggle = new EventEmitter < IgxSplitterPaneComponent > ( ) ;
@@ -59,35 +100,39 @@ export class IgxSplitterPaneComponent {
59
100
public order ! : number ;
60
101
61
102
/**
103
+ *
104
+ * @hidden @internal
62
105
* Gets the host native element.
63
- * @readonly
64
- * @type *
65
106
*/
66
107
public get element ( ) : any {
67
108
return this . el . nativeElement ;
68
109
}
69
110
70
111
/**
71
- * Sets/gets the `overflow` property of the current `IgxSplitterPaneComponent`.
112
+ * @hidden @internal
113
+ * Gets/Sets the `overflow`.
72
114
*/
73
115
@HostBinding ( 'style.overflow' )
74
116
public overflow = 'auto' ;
75
117
76
118
/**
77
- * Sets/gets the `minHeight` and `minWidth` propertis of the current `IgxSplitterPaneComponent`.
119
+ * @hidden @internal
120
+ * Gets/Sets the `minHeight` and `minWidth` properties of the current pane.
78
121
*/
79
122
@HostBinding ( 'style.min-height' )
80
123
@HostBinding ( 'style.min-width' )
81
124
public minHeight = 0 ;
82
125
83
126
/**
84
- * Sets/gets the `maxHeight` and `maxWidth` propertis of the current `IgxSplitterPaneComponent`.
127
+ * @hidden @internal
128
+ * Gets/Sets the `maxHeight` and `maxWidth` properties of the current `IgxSplitterPaneComponent`.
85
129
*/
86
130
@HostBinding ( 'style.max-height' )
87
131
@HostBinding ( 'style.max-width' )
88
132
public maxHeight = '100%' ;
89
133
90
134
/**
135
+ * @hidden @internal
91
136
* Gets the `flex` property of the current `IgxSplitterPaneComponent`.
92
137
*/
93
138
@HostBinding ( 'style.flex' )
@@ -99,13 +144,18 @@ export class IgxSplitterPaneComponent {
99
144
}
100
145
101
146
/**
102
- * Sets/gets the 'display' property of the current `IgxSplitterPaneComponent`
147
+ * @hidden @internal
148
+ * Gets/Sets the 'display' property of the current pane.
103
149
*/
104
150
@HostBinding ( 'style.display' )
105
151
public display = 'flex' ;
106
152
107
153
/**
108
- * Sets/gets whether current pane is collapsed.
154
+ * Gets/Sets whether current pane is collapsed.
155
+ * @example
156
+ * ```typescript
157
+ * const isCollapsed = pane.collapsed;
158
+ * ```
109
159
*/
110
160
@Input ( )
111
161
public set collapsed ( value ) {
@@ -133,6 +183,10 @@ export class IgxSplitterPaneComponent {
133
183
134
184
/**
135
185
* Toggles the collapsed state of the pane.
186
+ * @example
187
+ * ```typescript
188
+ * pane.toggle();
189
+ * ```
136
190
*/
137
191
public toggle ( ) {
138
192
// reset sibling sizes when pane collapse state changes.
0 commit comments