| 15 | } |
| 16 | |
| 17 | export class Paneview extends CompositeDisposable implements IDisposable { |
| 18 | private readonly element: HTMLElement; |
| 19 | private readonly splitview: Splitview; |
| 20 | private paneItems: PaneItem[] = []; |
| 21 | private readonly _orientation: Orientation; |
| 22 | private animationTimer: any; |
| 23 | private skipAnimation = false; |
| 24 | |
| 25 | private readonly _onDidChange = new Emitter<void>(); |
| 26 | readonly onDidChange: Event<void> = this._onDidChange.event; |
| 27 | |
| 28 | get onDidAddView(): Event<PaneviewPanel> { |
| 29 | return <Event<PaneviewPanel>>this.splitview.onDidAddView; |
| 30 | } |
| 31 | get onDidRemoveView(): Event<PaneviewPanel> { |
| 32 | return <Event<PaneviewPanel>>this.splitview.onDidRemoveView; |
| 33 | } |
| 34 | |
| 35 | get minimumSize(): number { |
| 36 | return this.splitview.minimumSize; |
| 37 | } |
| 38 | |
| 39 | get maximumSize(): number { |
| 40 | return this.splitview.maximumSize; |
| 41 | } |
| 42 | |
| 43 | get orientation(): Orientation { |
| 44 | return this.splitview.orientation; |
| 45 | } |
| 46 | |
| 47 | get size(): number { |
| 48 | return this.splitview.size; |
| 49 | } |
| 50 | |
| 51 | get orthogonalSize(): number { |
| 52 | return this.splitview.orthogonalSize; |
| 53 | } |
| 54 | |
| 55 | constructor( |
| 56 | container: HTMLElement, |
| 57 | options: { orientation: Orientation; descriptor?: ISplitViewDescriptor } |
| 58 | ) { |
| 59 | super(); |
| 60 | |
| 61 | this._orientation = options.orientation ?? Orientation.VERTICAL; |
| 62 | |
| 63 | this.element = document.createElement('div'); |
| 64 | this.element.className = 'dv-pane-container'; |
| 65 | |
| 66 | container.appendChild(this.element); |
| 67 | |
| 68 | this.splitview = new Splitview(this.element, { |
| 69 | orientation: this._orientation, |
| 70 | proportionalLayout: false, |
| 71 | descriptor: options.descriptor, |
| 72 | }); |
| 73 | |
| 74 | // if we've added views from the descriptor we need to |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…