aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesButtons.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
-rw-r--r--src/client/views/PropertiesButtons.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index e220bd7fc..e352db562 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -296,13 +296,12 @@ export class PropertiesButtons extends React.Component<{}, {}> {
setupMoveUpEvents(this, e, this.onAliasButtonMoved, emptyFunction, emptyFunction);
}
@undoBatch
- onAliasButtonMoved = () => {
+ onAliasButtonMoved = (e: PointerEvent) => {
if (this._dragRef.current && this.selectedDoc) {
- const dragDocView = this.selectedDocumentView!;
const dragData = new DragManager.DocumentDragData([this.selectedDoc]);
- const [left, top] = dragDocView.props.ScreenToLocalTransform().inverse().transformPoint(0, 0);
+ const [left, top] = [e.clientX, e.clientY];
dragData.dropAction = "alias";
- DragManager.StartDocumentDrag([dragDocView.ContentDiv!], dragData, left, top, {
+ DragManager.StartDocumentDrag([this._dragRef.current!], dragData, left, top, {
offsetX: dragData.offset[0],
offsetY: dragData.offset[1],
hideSource: false