chore: docs

This commit is contained in:
mathuo 2023-02-20 20:32:25 +07:00
parent fb9c056ff6
commit 4ff77d4696
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281

View File

@ -4,6 +4,7 @@ import {
DockviewReact, DockviewReact,
DockviewReadyEvent, DockviewReadyEvent,
IDockviewPanelProps, IDockviewPanelProps,
positionToDirection,
} from 'dockview'; } from 'dockview';
import * as React from 'react'; import * as React from 'react';
@ -54,14 +55,12 @@ export const DndDockview = (props: { renderVisibleOnly: boolean }) => {
}; };
const onDidDrop = (event: DockviewDropEvent) => { const onDidDrop = (event: DockviewDropEvent) => {
const { group } = event;
event.api.addPanel({ event.api.addPanel({
id: 'test', id: 'test',
component: 'default', component: 'default',
position: { position: {
referencePanel: group.activePanel.id, direction: positionToDirection(event.position),
direction: 'within', referenceGroup: event.group,
}, },
}); });
}; };