File tree 2 files changed +5
-8
lines changed
app/components/primer/alpha
2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @primer/view-components ' : patch
3
+ ---
4
+
5
+ Remove redundant code for better performance.
Original file line number Diff line number Diff line change @@ -36,14 +36,6 @@ class ActionBarElement extends HTMLElement {
36
36
#focusZoneAbortController: AbortController | null = null
37
37
38
38
connectedCallback ( ) {
39
- // Calculate the width of all the items before hiding anything
40
- for ( const item of this . items ) {
41
- const width = item . getBoundingClientRect ( ) . width
42
- const marginLeft = parseInt ( window . getComputedStyle ( item ) ?. marginLeft , 10 )
43
- const marginRight = parseInt ( window . getComputedStyle ( item ) ?. marginRight , 10 )
44
- item . setAttribute ( 'data-offset-width' , `${ width + marginLeft + marginRight } ` )
45
- }
46
-
47
39
resizeObserver . observe ( this )
48
40
instersectionObserver . observe ( this )
49
41
You can’t perform that action at this time.
0 commit comments