Skip to content

Commit a7d0497

Browse files
committed
chore(*): restore setDragImage offset
1 parent c0d1345 commit a7d0497

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/components/tile-manager/tile.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ export default class IgcTileComponent extends EventEmitterMixin<
166166
return this._rowStart;
167167
}
168168

169+
/**
170+
* Indicates whether the tile occupies the whole screen.
171+
* @attr fullscreen
172+
*/
169173
@property({ type: Boolean, reflect: true })
170174
public set fullscreen(value: boolean) {
171175
if (this._fullscreen === value) return;
@@ -181,7 +185,7 @@ export default class IgcTileComponent extends EventEmitterMixin<
181185

182186
/**
183187
* Indicates whether the tile occupies all available space within the layout.
184-
* @attr
188+
* @attr maximized
185189
*/
186190
@property({ type: Boolean, reflect: true })
187191
public set maximized(value: boolean) {
@@ -322,11 +326,11 @@ export default class IgcTileComponent extends EventEmitterMixin<
322326
bubbles: true,
323327
});
324328

325-
// const rect = this.getBoundingClientRect();
326-
// const offsetX = e.clientX - rect.left;
327-
// const offsetY = e.clientY - rect.top;
329+
const rect = this.getBoundingClientRect();
330+
const offsetX = e.clientX - rect.left;
331+
const offsetY = e.clientY - rect.top;
328332

329-
e.dataTransfer!.setDragImage(this, 0, 0);
333+
e.dataTransfer!.setDragImage(this, offsetX, offsetY);
330334
e.dataTransfer!.effectAllowed = 'move';
331335

332336
this.dispatchEvent(event);

0 commit comments

Comments
 (0)