Skip to content

Commit

Permalink
fix: revert change to ghost element positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlewis92 committed Oct 11, 2019
1 parent ec178a4 commit e0128e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ describe('draggable directive', () => {
triggerDomEvent('mousedown', draggableElement, { clientX: 5, clientY: 10 });
triggerDomEvent('mousemove', draggableElement, { clientX: 7, clientY: 10 });
const ghostElement = draggableElement.nextSibling as HTMLElement;
expect(ghostElement.style.position).to.equal('absolute');
expect(ghostElement.style.position).to.equal('fixed');
expect(ghostElement.style.top).to.be.ok;
expect(ghostElement.style.left).to.be.ok;
expect(ghostElement.style.width).to.be.ok;
Expand Down Expand Up @@ -755,7 +755,7 @@ describe('draggable directive', () => {
triggerDomEvent('mousemove', draggableElement, { clientX: 7, clientY: 10 });
const ghostElement = fixture.componentInstance.ghostElementAppendTo
.children[0] as HTMLElement;
expect(ghostElement.style.position).to.equal('absolute');
expect(ghostElement.style.position).to.equal('fixed');
expect(ghostElement.style.top).to.be.ok;
expect(ghostElement.style.left).to.be.ok;
expect(ghostElement.style.width).to.be.ok;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ export class DraggableDirective implements OnInit, OnChanges, OnDestroy {
document.body.style.cursor = this.dragCursor;

this.setElementStyles(clone, {
position: 'absolute',
position: 'fixed',
top: `${rect.top}px`,
left: `${rect.left}px`,
width: `${rect.width}px`,
Expand Down

0 comments on commit e0128e5

Please sign in to comment.