MCPcopy Create free account
hub / github.com/UI5/webcomponents / _getItemWidth

Method _getItemWidth

packages/main/src/TabContainer.ts:1206–1211  ·  view source on GitHub ↗
(itemDomRef: HTMLElement)

Source from the content-addressed store, hash-verified

1204 }
1205
1206 _getItemWidth(itemDomRef: HTMLElement) {
1207 const styles = window.getComputedStyle(itemDomRef);
1208 const margins = Number.parseInt(styles.marginLeft) + Number.parseInt(styles.marginRight);
1209
1210 return itemDomRef.offsetWidth + margins;
1211 }
1212
1213 _getSelectedItemIndexAndWidth(itemsDomRefs: Array<TabInStrip | TabSeparatorInStrip>, selectedTabDomRef: TabInStrip | undefined) {
1214 if (!selectedTabDomRef) {

Callers 6

_setItemsForStripMethod · 0.95
_hasStartOverflowMethod · 0.95
_hasEndOverflowMethod · 0.95
_findFirstVisibleItemMethod · 0.95
_findLastVisibleItemMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected