MCPcopy
hub / github.com/mathuo/dockview / Splitview

Class Splitview

packages/dockview-core/src/splitview/splitview.ts:99–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99export class Splitview {
100 private readonly element: HTMLElement;
101 private readonly viewContainer: HTMLElement;
102 private readonly sashContainer: HTMLElement;
103 private readonly viewItems: ViewItem[] = [];
104 private readonly sashes: ISashItem[] = [];
105 private _orientation: Orientation;
106 private _size = 0;
107 private _orthogonalSize = 0;
108 private _contentSize = 0;
109 private _proportions: (number | undefined)[] | undefined = undefined;
110 private readonly proportionalLayout: boolean;
111 private _startSnappingEnabled = true;
112 private _endSnappingEnabled = true;
113 private _disabled = false;
114 private _margin = 0;
115
116 private readonly _onDidSashEnd = new Emitter<void>();
117 readonly onDidSashEnd = this._onDidSashEnd.event;
118 private readonly _onDidAddView = new Emitter<IView>();
119 readonly onDidAddView = this._onDidAddView.event;
120 private readonly _onDidRemoveView = new Emitter<IView>();
121 readonly onDidRemoveView = this._onDidRemoveView.event;
122
123 get contentSize(): number {
124 return this._contentSize;
125 }
126
127 get size(): number {
128 return this._size;
129 }
130
131 set size(value: number) {
132 this._size = value;
133 }
134
135 get orthogonalSize(): number {
136 return this._orthogonalSize;
137 }
138
139 set orthogonalSize(value: number) {
140 this._orthogonalSize = value;
141 }
142
143 public get length(): number {
144 return this.viewItems.length;
145 }
146
147 public get proportions(): (number | undefined)[] | undefined {
148 return this._proportions ? [...this._proportions] : undefined;
149 }
150
151 get orientation(): Orientation {
152 return this._orientation;
153 }
154
155 set orientation(value: Orientation) {
156 this._orientation = value;

Callers

nothing calls this directly

Calls 6

rangeFunction · 0.90
pushToStartFunction · 0.90
pushToEndFunction · 0.90
clampFunction · 0.90
resizeMethod · 0.80
setVisibleMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…