Merge branch 'master' of https://github.com/mathuo/dockview into 739-sonar-code-cleanup

This commit is contained in:
mathuo 2024-10-29 20:24:16 +00:00
commit 112dc2e2a9
No known key found for this signature in database
GPG Key ID: C6EEDEFD6CA07281

View File

@ -13,7 +13,6 @@ import {
PROPERTY_KEYS,
DockviewComponentOptions,
DockviewFrameworkOptions,
DockviewDndOverlayEvent,
DockviewReadyEvent,
createDockview,
} from 'dockview-core';
@ -56,10 +55,6 @@ export interface IDockviewReactProps extends DockviewOptions {
onReady: (event: DockviewReadyEvent) => void;
onDidDrop?: (event: DockviewDidDropEvent) => void;
onWillDrop?: (event: DockviewWillDropEvent) => void;
/**
* @deprecated use `api.onUnhandledDragOverEvent` instead. This will be removed in the next release.
*/
showDndOverlay?: (event: DockviewDndOverlayEvent) => boolean;
}
function extractCoreOptions(props: IDockviewReactProps): DockviewOptions {
@ -203,26 +198,6 @@ export const DockviewReact = React.forwardRef(
};
}, [props.onDidDrop]);
React.useEffect(() => {
if (!dockviewRef.current) {
return () => {
// noop
};
}
const disposable = dockviewRef.current.onUnhandledDragOverEvent(
(event) => {
if (props.showDndOverlay?.(event)) {
event.accept();
}
}
);
return () => {
disposable.dispose();
};
}, [props.showDndOverlay]);
React.useEffect(() => {
if (!dockviewRef.current) {
return () => {