Skip to content

Commit d176800

Browse files
authored
fix(ui5-avatar-group): adapt width calculations in composite layouts (#5357)
The calculations of the main container width have been adjusted to take into account sibling nodes. Fixes #5333
1 parent 1aac3c5 commit d176800

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/main/src/AvatarGroup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ class AvatarGroup extends UI5Element {
382382
item = button;
383383
}
384384

385-
return this.effectiveDir === "rtl" ? this._getWidthToItem(item) : item.offsetLeft;
385+
return this.effectiveDir === "rtl" ? this._getWidthToItem(item) : item.offsetLeft - this.offsetLeft;
386386
}
387387

388388
return button.offsetWidth;
@@ -526,7 +526,7 @@ class AvatarGroup extends UI5Element {
526526
}
527527

528528
// in LTR the width is equal to item.offsetLeft
529-
return item.offsetLeft;
529+
return item.offsetLeft - this.offsetLeft;
530530
}
531531

532532
/**

0 commit comments

Comments
 (0)