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

Class ShellManager

packages/dockview-core/src/dockview/dockviewShell.ts:378–898  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378export class ShellManager implements IDisposable {
379 private readonly _outerSplitview: Splitview;
380 private readonly _middleColumn: MiddleColumnView;
381 private readonly _shellElement: HTMLElement;
382
383 private _topView: EdgeGroupView | undefined;
384 private _bottomView: EdgeGroupView | undefined;
385 private _leftView: EdgeGroupView | undefined;
386 private _rightView: EdgeGroupView | undefined;
387
388 // Indices in the outer HORIZONTAL splitview
389 private _leftIndex: number | undefined;
390 private _middleIndex: number;
391 private _rightIndex: number | undefined;
392
393 private readonly _disposables = new CompositeDisposable();
394
395 // Retained for updateTheme() recalculations.
396 private readonly _viewConfigs = new Map<
397 EdgeGroupPosition,
398 EdgeGroupOptions
399 >();
400 private _currentWidth = 0;
401 private _currentHeight = 0;
402 private _gap: number;
403 private _defaultCollapsedSize: number;
404
405 constructor(
406 container: HTMLElement,
407 dockviewElement: HTMLElement,
408 layoutGrid: (width: number, height: number) => void,
409 gap = 0,
410 defaultCollapsedSize = 35
411 ) {
412 this._gap = gap;
413 this._defaultCollapsedSize = defaultCollapsedSize;
414
415 this._shellElement = document.createElement('div');
416 this._shellElement.className = 'dv-shell';
417 this._shellElement.style.height = '100%';
418 this._shellElement.style.width = '100%';
419 this._shellElement.style.position = 'relative';
420 container.appendChild(this._shellElement);
421
422 const centerView = new CenterView(dockviewElement, layoutGrid);
423
424 this._middleColumn = new MiddleColumnView(centerView, gap);
425
426 this._outerSplitview = new Splitview(this._shellElement, {
427 orientation: Orientation.HORIZONTAL,
428 proportionalLayout: false,
429 margin: gap,
430 });
431
432 this._middleIndex = 0;
433 this._outerSplitview.addView(
434 this._middleColumn,
435 { type: 'distribute' },

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…