Ensure our drag actor is positioned over the cursor
Previously we were looking at the source size, which is not necessarily the same as the drag actor size. https://bugzilla.gnome.org/show_bug.cgi?id=607821
This commit is contained in:
parent
087ac8470e
commit
7d8c3f1ecd
@ -154,10 +154,9 @@ _Draggable.prototype = {
|
||||
// the dragActor over it. Otherwise, center it
|
||||
// around the pointer
|
||||
let [sourceX, sourceY] = this._dragActorSource.get_transformed_position();
|
||||
let [sourceWidth, sourceHeight] = this._dragActorSource.get_transformed_size();
|
||||
let x, y;
|
||||
if (stageX > sourceX && stageX <= sourceX + sourceWidth &&
|
||||
stageY > sourceY && stageY <= sourceY + sourceHeight) {
|
||||
if (stageX > sourceX && stageX <= sourceX + this._dragActor.width &&
|
||||
stageY > sourceY && stageY <= sourceY + this._dragActor.height) {
|
||||
x = sourceX;
|
||||
y = sourceY;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user