Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
[Lens] Refactor reorder drag and drop (elastic#88578)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra authored Feb 1, 2021
1 parent e31b6a8 commit 1b8c3c1
Show file tree
Hide file tree
Showing 39 changed files with 2,074 additions and 1,152 deletions.
2 changes: 1 addition & 1 deletion test/functional/services/common/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,13 @@ export async function BrowserProvider({ getService }: FtrProviderContext) {
}
const origin = document.querySelector(arguments[0]);
const target = document.querySelector(arguments[1]);
const dragStartEvent = createEvent('dragstart');
dispatchEvent(origin, dragStartEvent);
setTimeout(() => {
const dropEvent = createEvent('drop');
const target = document.querySelector(arguments[1]);
dispatchEvent(target, dropEvent, dragStartEvent.dataTransfer);
const dragEndEvent = createEvent('dragend');
dispatchEvent(origin, dragEndEvent, dropEvent.dataTransfer);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions x-pack/plugins/lens/public/drag_drop/drag_drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}
}

.lnsDragDrop__reorderableContainer {
.lnsDragDrop__container {
position: relative;
}

Expand All @@ -63,11 +63,18 @@
height: calc(100% + #{$lnsLayerPanelDimensionMargin});
}

.lnsDragDrop-isReorderable {
.lnsDragDrop-translatableDrop {
transform: translateY(0);
transition: transform $euiAnimSpeedFast ease-in-out;
pointer-events: none;
}

.lnsDragDrop-translatableDrag {
transform: translateY(0);
transition: transform $euiAnimSpeedFast ease-in-out;
position: relative;
}

// Draggable item when it is moving
.lnsDragDrop-isHidden {
opacity: 0;
Expand Down
Loading

0 comments on commit 1b8c3c1

Please sign in to comment.