dockview
Version:
Zero dependency layout manager supporting tabs, grids and splitviews with ReactJS support
30 lines (29 loc) • 967 B
JavaScript
import { Emitter } from '../events';
import { PanelApiImpl } from './panelApi';
export class SplitviewPanelApiImpl extends PanelApiImpl {
//
constructor(id) {
super(id);
this._onDidConstraintsChangeInternal = new Emitter();
this.onDidConstraintsChangeInternal = this._onDidConstraintsChangeInternal.event;
//
this._onDidConstraintsChange = new Emitter({
replay: true,
});
this.onDidConstraintsChange = this._onDidConstraintsChange.event;
//
this._onDidSizeChange = new Emitter();
this.onDidSizeChange = this._onDidSizeChange.event;
}
setConstraints(value) {
this._onDidConstraintsChangeInternal.fire(value);
}
setSize(event) {
this._onDidSizeChange.fire(event);
}
dispose() {
super.dispose();
this._onDidConstraintsChange.dispose();
this._onDidSizeChange.dispose();
}
}