diff --git a/patterns/multiselektions-pulldown.html b/patterns/multiselektions-pulldown.html index 3e5f62a..f81c525 100644 --- a/patterns/multiselektions-pulldown.html +++ b/patterns/multiselektions-pulldown.html @@ -502,36 +502,12 @@ } }); - demo.dataset.align = 'left'; demo.dataset.open = String(nextState); trigger.setAttribute('aria-expanded', String(nextState)); if (!nextState) { return; } - - const panel = demo.querySelector('.sg-pulldown-panel'); - if (!panel) { - return; - } - - demo.dataset.align = 'left'; - panel.style.left = '0px'; - panel.style.right = 'auto'; - - const initialRect = panel.getBoundingClientRect(); - let offsetX = 0; - const maxRight = window.innerWidth; - - if (initialRect.right > maxRight) { - offsetX -= initialRect.right - maxRight; - } - - if (initialRect.left + offsetX < 0) { - offsetX += 0 - (initialRect.left + offsetX); - } - - panel.style.left = `${offsetX}px`; }); });