Archived
only modify toc and move files if the target is a section or book (#17054)
This commit is contained in:
@@ -737,6 +737,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onDrop(sources: vscode.TreeDataTransfer, target: BookTreeItem): Promise<void> {
|
async onDrop(sources: vscode.TreeDataTransfer, target: BookTreeItem): Promise<void> {
|
||||||
|
if (target.contextValue === BookTreeItemType.savedBook || target.contextValue === BookTreeItemType.section) {
|
||||||
TelemetryReporter.sendActionEvent(BookTelemetryView, NbTelemetryActions.DragAndDrop);
|
TelemetryReporter.sendActionEvent(BookTelemetryView, NbTelemetryActions.DragAndDrop);
|
||||||
// gets the tree items that are dragged and dropped
|
// gets the tree items that are dragged and dropped
|
||||||
let treeItems = JSON.parse(await sources.items.get(this.supportedTypes[0])!.asString()) as BookTreeItem[];
|
let treeItems = JSON.parse(await sources.items.get(this.supportedTypes[0])!.asString()) as BookTreeItem[];
|
||||||
@@ -751,6 +752,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* From the tree items moved find the local roots.
|
* From the tree items moved find the local roots.
|
||||||
|
|||||||
Reference in New Issue
Block a user