Skip to content

Commit

Permalink
fixes planning action container floating behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentChin committed May 5, 2020
1 parent 5e90df0 commit 2bda228
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions assets/js/planning.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ $(document).ready(function () {
$('#loader').hide();

const actionContainer = document.querySelector('.planning-actions-container-wrapper');
const [planning] = $planning;

window.addEventListener('scroll', () => {
actionContainer.style.transform = `translate3d(${document.scrollingElement.scrollLeft}px, 0, 0)`;
});
if (planning?.clientWidth > window.innerWidth) {
window.addEventListener('scroll', () => {
actionContainer.style.transform = `translate3d(${document.scrollingElement.scrollLeft}px, 0, 0)`;
});
}
});

0 comments on commit 2bda228

Please sign in to comment.