mirror of
https://github.com/mathuo/dockview
synced 2025-09-01 15:06:25 +00:00
bug: remove splitview dom element
This commit is contained in:
parent
54ae457ccd
commit
d30263af67
@ -198,6 +198,8 @@ describe('gridview', () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
expect(container.querySelectorAll('.dv-grid-view').length).toBe(1);
|
||||||
|
|
||||||
gridview.layout(800, 400);
|
gridview.layout(800, 400);
|
||||||
gridview.fromJSON({
|
gridview.fromJSON({
|
||||||
grid: {
|
grid: {
|
||||||
@ -242,6 +244,9 @@ describe('gridview', () => {
|
|||||||
},
|
},
|
||||||
activePanel: 'panel_1',
|
activePanel: 'panel_1',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
expect(container.querySelectorAll('.dv-grid-view').length).toBe(1);
|
||||||
|
|
||||||
gridview.layout(800, 400, true);
|
gridview.layout(800, 400, true);
|
||||||
|
|
||||||
const panel1 = gridview.getPanel('panel_1')!;
|
const panel1 = gridview.getPanel('panel_1')!;
|
||||||
|
@ -180,6 +180,8 @@ describe('componentPaneview', () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
expect(container.querySelectorAll('.dv-pane-container').length).toBe(1);
|
||||||
|
|
||||||
paneview.fromJSON({
|
paneview.fromJSON({
|
||||||
size: 6,
|
size: 6,
|
||||||
views: [
|
views: [
|
||||||
@ -212,6 +214,8 @@ describe('componentPaneview', () => {
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
expect(container.querySelectorAll('.dv-pane-container').length).toBe(1);
|
||||||
|
|
||||||
paneview.layout(400, 800);
|
paneview.layout(400, 800);
|
||||||
|
|
||||||
const panel1 = paneview.getPanel('panel1');
|
const panel1 = paneview.getPanel('panel1');
|
||||||
|
@ -395,6 +395,10 @@ describe('componentSplitview', () => {
|
|||||||
});
|
});
|
||||||
splitview.layout(400, 6);
|
splitview.layout(400, 6);
|
||||||
|
|
||||||
|
expect(
|
||||||
|
container.querySelectorAll('.dv-split-view-container').length
|
||||||
|
).toBe(1);
|
||||||
|
|
||||||
splitview.fromJSON({
|
splitview.fromJSON({
|
||||||
views: [
|
views: [
|
||||||
{
|
{
|
||||||
@ -414,6 +418,10 @@ describe('componentSplitview', () => {
|
|||||||
activeView: 'panel1',
|
activeView: 'panel1',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
expect(
|
||||||
|
container.querySelectorAll('.dv-split-view-container').length
|
||||||
|
).toBe(1);
|
||||||
|
|
||||||
expect(splitview.length).toBe(3);
|
expect(splitview.length).toBe(3);
|
||||||
|
|
||||||
expect(JSON.parse(JSON.stringify(splitview.toJSON()))).toEqual({
|
expect(JSON.parse(JSON.stringify(splitview.toJSON()))).toEqual({
|
||||||
|
@ -122,6 +122,10 @@ export class SplitviewComponent
|
|||||||
}
|
}
|
||||||
|
|
||||||
set splitview(value: Splitview) {
|
set splitview(value: Splitview) {
|
||||||
|
if (this._splitview) {
|
||||||
|
this._splitview.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
this._splitview = value;
|
this._splitview = value;
|
||||||
|
|
||||||
this._splitviewChangeDisposable.value = new CompositeDisposable(
|
this._splitviewChangeDisposable.value = new CompositeDisposable(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user