mirror of
https://github.com/mathuo/dockview
synced 2025-01-22 17:35:57 +00:00
replace DockviewDropTragets with DockviewGroupDropLocation
This commit is contained in:
parent
5a635336b3
commit
12c873c7cf
@ -94,7 +94,7 @@ export class ContentContainer
|
|||||||
return !groupHasOnePanelAndIsActiveDragElement;
|
return !groupHasOnePanelAndIsActiveDragElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.group.canDisplayOverlay(event, position, 'panel');
|
return this.group.canDisplayOverlay(event, position, 'content');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -67,7 +67,11 @@ export class VoidContainer extends CompositeDisposable {
|
|||||||
return last(this.group.panels)?.id !== data.panelId;
|
return last(this.group.panels)?.id !== data.panelId;
|
||||||
}
|
}
|
||||||
|
|
||||||
return group.model.canDisplayOverlay(event, position, 'panel');
|
return group.model.canDisplayOverlay(
|
||||||
|
event,
|
||||||
|
position,
|
||||||
|
'header_space'
|
||||||
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ import {
|
|||||||
TabDragEvent,
|
TabDragEvent,
|
||||||
TabsContainer,
|
TabsContainer,
|
||||||
} from './components/titlebar/tabsContainer';
|
} from './components/titlebar/tabsContainer';
|
||||||
import { DockviewDropTargets, IWatermarkRenderer } from './types';
|
import { IWatermarkRenderer } from './types';
|
||||||
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
||||||
import { IDockviewPanel } from './dockviewPanel';
|
import { IDockviewPanel } from './dockviewPanel';
|
||||||
import { IHeaderActionsRenderer } from './options';
|
import { IHeaderActionsRenderer } from './options';
|
||||||
@ -175,7 +175,7 @@ export interface IDockviewGroupPanelModel extends IPanel {
|
|||||||
canDisplayOverlay(
|
canDisplayOverlay(
|
||||||
event: DragEvent,
|
event: DragEvent,
|
||||||
position: Position,
|
position: Position,
|
||||||
target: DockviewDropTargets
|
target: DockviewGroupDropLocation
|
||||||
): boolean;
|
): boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -924,7 +924,7 @@ export class DockviewGroupPanelModel
|
|||||||
canDisplayOverlay(
|
canDisplayOverlay(
|
||||||
event: DragEvent,
|
event: DragEvent,
|
||||||
position: Position,
|
position: Position,
|
||||||
target: DockviewDropTargets
|
target: DockviewGroupDropLocation
|
||||||
): boolean {
|
): boolean {
|
||||||
// custom overlay handler
|
// custom overlay handler
|
||||||
if (this.accessor.options.showDndOverlay) {
|
if (this.accessor.options.showDndOverlay) {
|
||||||
|
@ -6,7 +6,6 @@ import {
|
|||||||
ITabRenderer,
|
ITabRenderer,
|
||||||
WatermarkConstructor,
|
WatermarkConstructor,
|
||||||
IWatermarkRenderer,
|
IWatermarkRenderer,
|
||||||
DockviewDropTargets,
|
|
||||||
} from './types';
|
} from './types';
|
||||||
import { Parameters } from '../panel/types';
|
import { Parameters } from '../panel/types';
|
||||||
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
import { DockviewGroupPanel } from './dockviewGroupPanel';
|
||||||
@ -14,7 +13,7 @@ import { ISplitviewStyles, Orientation } from '../splitview/splitview';
|
|||||||
import { PanelTransfer } from '../dnd/dataTransfer';
|
import { PanelTransfer } from '../dnd/dataTransfer';
|
||||||
import { IDisposable } from '../lifecycle';
|
import { IDisposable } from '../lifecycle';
|
||||||
import { DroptargetOverlayModel, Position } from '../dnd/droptarget';
|
import { DroptargetOverlayModel, Position } from '../dnd/droptarget';
|
||||||
import { GroupOptions } from './dockviewGroupPanelModel';
|
import { DockviewGroupDropLocation, GroupOptions } from './dockviewGroupPanelModel';
|
||||||
import { IDockviewPanel } from './dockviewPanel';
|
import { IDockviewPanel } from './dockviewPanel';
|
||||||
import {
|
import {
|
||||||
ComponentConstructor,
|
ComponentConstructor,
|
||||||
@ -65,7 +64,7 @@ export interface ViewFactoryData {
|
|||||||
|
|
||||||
export interface DockviewDndOverlayEvent {
|
export interface DockviewDndOverlayEvent {
|
||||||
nativeEvent: DragEvent;
|
nativeEvent: DragEvent;
|
||||||
target: DockviewDropTargets;
|
target: DockviewGroupDropLocation;
|
||||||
position: Position;
|
position: Position;
|
||||||
group?: DockviewGroupPanel;
|
group?: DockviewGroupPanel;
|
||||||
getData: () => PanelTransfer | undefined;
|
getData: () => PanelTransfer | undefined;
|
||||||
|
@ -7,8 +7,6 @@ import { Optional } from '../types';
|
|||||||
import { DockviewGroupPanel, IDockviewGroupPanel } from './dockviewGroupPanel';
|
import { DockviewGroupPanel, IDockviewGroupPanel } from './dockviewGroupPanel';
|
||||||
import { DockviewPanelRenderer } from '../overlayRenderContainer';
|
import { DockviewPanelRenderer } from '../overlayRenderContainer';
|
||||||
|
|
||||||
export type DockviewDropTargets = 'tab' | 'panel' | 'tabContainer' | 'edge';
|
|
||||||
|
|
||||||
export interface HeaderPartInitParameters {
|
export interface HeaderPartInitParameters {
|
||||||
title: string;
|
title: string;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user