mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
wip: basic list dnd with animation
This commit is contained in:
@@ -130,6 +130,23 @@ function asObjectTreeOptions<TInput, T, TFilterData>(options?: IAsyncDataTreeOpt
|
||||
return options.identityProvider!.getId(el.element as T);
|
||||
}
|
||||
},
|
||||
dnd: options.dnd && {
|
||||
getDragURI(node) {
|
||||
return options.dnd!.getDragURI(node.element as T);
|
||||
},
|
||||
getDragLabel: options.dnd!.getDragLabel && ((nodes) => {
|
||||
return options.dnd!.getDragLabel!(nodes.map(node => node.element as T));
|
||||
}),
|
||||
onDragStart(data, originalEvent) {
|
||||
return options.dnd!.onDragStart(data, originalEvent);
|
||||
},
|
||||
onDragOver(data, targetNode, originalEvent) {
|
||||
return options.dnd!.onDragOver(data, targetNode.element as T, originalEvent);
|
||||
},
|
||||
drop(data, targetNode, originalEvent) {
|
||||
return options.dnd!.drop(data, targetNode.element as T, originalEvent);
|
||||
}
|
||||
},
|
||||
multipleSelectionController: options.multipleSelectionController && {
|
||||
isSelectionSingleChangeEvent(e) {
|
||||
return options.multipleSelectionController!.isSelectionSingleChangeEvent({ ...e, element: e.element } as any);
|
||||
|
||||
Reference in New Issue
Block a user