Skip to content

Commit

Permalink
remove redundant code from action-bar-element
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus authored Dec 3, 2024
1 parent a574b0e commit 95f4894
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions app/components/primer/alpha/action_bar_element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ class ActionBarElement extends HTMLElement {
#focusZoneAbortController: AbortController | null = null

connectedCallback() {
// Calculate the width of all the items before hiding anything
for (const item of this.items) {
const width = item.getBoundingClientRect().width
const marginLeft = parseInt(window.getComputedStyle(item)?.marginLeft, 10)
const marginRight = parseInt(window.getComputedStyle(item)?.marginRight, 10)
item.setAttribute('data-offset-width', `${width + marginLeft + marginRight}`)
}

resizeObserver.observe(this)
instersectionObserver.observe(this)

Expand Down

0 comments on commit 95f4894

Please sign in to comment.