提交 729400d7 编写于 作者: R rebornix

reveal position when dragging

上级 f1a1fd24
......@@ -403,9 +403,21 @@ class MouseDownOperation extends Disposable {
}
if (this._mouseState.isDragAndDrop) {
let target = this._createMouseTarget(e, true);
if (!target.position) {
target = {
element: target.element,
type: target.type,
position: position.position,
mouseColumn: target.mouseColumn,
range: target.range,
detail: target.detail
};
}
this._viewController.emitMouseDrag({
event: e,
target: this._createMouseTarget(e, true)
target: target
});
} else {
this._dispatchMouse(position, true);
......
......@@ -44,6 +44,7 @@ export class DragAndDropController implements editorCommon.IEditorContribution {
if (this._active) {
this._targetWidget.showAt(target.position);
this._editor.revealPosition(target.position);
} else {
let possibleSelections = this._editor.getSelections().filter(selection => selection.containsPosition(target.position));
......@@ -51,6 +52,7 @@ export class DragAndDropController implements editorCommon.IEditorContribution {
this._active = true;
this._dragSelection = possibleSelections[0];
this._targetWidget.showAt(target.position);
this._editor.revealPosition(target.position);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册