提交 80233e9c 编写于 作者: B Benjamin Pasero

adopt getDragLabel for open editors view too

上级 25b370a3
......@@ -757,7 +757,7 @@ export class FileDragAndDrop implements IDragAndDrop {
return stat.resource.toString();
}
getDragLabel(tree: ITree, elements: any[]): string {
public getDragLabel(tree: ITree, elements: any[]): string {
if (elements.length > 1) {
return String(elements.length);
}
......
......@@ -487,6 +487,14 @@ export class DragAndDrop extends treedefaults.DefaultDragAndDrop {
return resource ? resource.toString() : element.editorInput.getName();
}
public getDragLabel(tree: ITree, elements: OpenEditor[]): string {
if (elements.length > 1) {
return String(elements.length);
}
return elements[0].editorInput.getName();
}
public onDragOver(tree: ITree, data: IDragAndDropData, target: OpenEditor | EditorGroup, originalEvent: DragMouseEvent): IDragOverReaction {
if (!(target instanceof OpenEditor) && !(target instanceof EditorGroup)) {
return DRAG_OVER_REJECT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册