Skip to content

Commit

Permalink
Merge pull request #1234 from ezsystems/revert-1229-EZEE-2975-page-bu…
Browse files Browse the repository at this point in the history
…ilder-dropdown-widgets-too-low

Revert "EZEE-2975: In Page Builder dropdown widgets are too low after being expanded"
  • Loading branch information
lserwatka authored Feb 14, 2020
2 parents 9d483ab + 004283b commit 36698eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
20 changes: 1 addition & 19 deletions src/bundle/Resources/public/js/scripts/sidebar/extra.actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,7 @@
}
};

if (actions.classList.contains('ez-extra-actions--dropdown')) {
const actionsRect = actions.getBoundingClientRect();
const fitsViewport = actionsRect.height + btn.offsetTop <= global.innerHeight;

actions.style.opacity = 0;

if (!fitsViewport) {
actions.style.bottom = `0px`;
actions.style.top = 'auto';
} else {
actions.style.top = `${btn.offsetTop}px`;
actions.style.bottom = 'auto';
}

actions.style.opacity = 1;
} else {
btn.classList[methodNameButton](CLASS_ACTIVE_BUTTON);
}

btn.classList[methodNameButton](CLASS_ACTIVE_BUTTON);
actions.classList[methodNameContainer](CLASS_HIDDEN);

if (!actions.classList.contains(CLASS_HIDDEN)) {
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Resources/public/scss/_extra-actions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@
opacity: 1;
transform: translate(calc(-100%), 0) scaleX(1);
transform-origin: right center;
transition: transform 0.4s ease-in, opacity 0.4s ease-in;
transition: all 0.4s ease-in;

&--hidden {
opacity: 0;
transform: translate(calc(-100%), 0) scaleX(0);
transition: transform 0.2s ease-out, opacity 0.2s ease-out;
transition: all 0.2s ease-out;
}
}
}

0 comments on commit 36698eb

Please # to comment.