Skip to content

Commit 23e6dac

Browse files
committed
Small fixes to ensure drop targets are shown in front.
1 parent 5670907 commit 23e6dac

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

grab.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ export class MoveGrab {
243243
if (x < colX)
244244
continue;
245245

246+
// vertically tiled
246247
for (let i = 0; i < column.length + 1; i++) {
247248
let clone;
248249
if (i < column.length) {
@@ -498,24 +499,26 @@ export class MoveGrab {
498499
}
499500

500501
activateDndTarget(zone, first) {
501-
function mkZoneActor(props) {
502+
const mkZoneActor = props => {
502503
let actor = new St.Widget({ style_class: "tile-preview" });
503504
actor.x = props.x ?? 0;
504505
actor.y = props.y ?? 0;
505506
actor.width = props.width ?? 0;
506507
actor.height = props.height ?? 0;
507508
return actor;
508-
}
509+
};
509510

510511
zone.actor = mkZoneActor({ ...zone.actorParams });
511512

512513
this.dndTarget = zone;
513514
this.zoneActors.add(zone.actor);
515+
const raise = () => Utils.actor_raise(zone.actor);
514516

515517
let params = {
516518
time: Settings.prefs.animation_time,
517519
[zone.originProp]: zone.center - zone.marginA,
518520
[zone.sizeProp]: zone.marginA + zone.marginB,
521+
onComplete: raise,
519522
};
520523

521524
if (first) {
@@ -535,7 +538,7 @@ export class MoveGrab {
535538
zone.space.cloneContainer.add_child(zone.actor);
536539
zone.space.selection.hide();
537540
zone.actor.show();
538-
Utils.actor_raise(zone.actor);
541+
raise();
539542
Easer.addEase(zone.actor, params);
540543
}
541544

0 commit comments

Comments
 (0)