Skip to content

Commit

Permalink
feat: allow surface class radius to be overwritten by parent (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshhowenstine authored Oct 30, 2024
1 parent f3fef97 commit 3db0c5c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export default class Surface extends Base {
return this.w;
}

get _radius() {
return getMaxRoundRadius(this.style.radius, this.w, this.h);
}

_update() {
this._updateLayout();
this._updateScale();
Expand All @@ -62,7 +66,7 @@ export default class Surface extends Base {
texture: lng.Tools.getRoundRect(
this.innerW - 2, // Reference the underscored values here in cause the h or w getters need to be overwritten for alignment - see Tile
this.innerH - 2,
getMaxRoundRadius(this.style.radius, this.w, this.h),
this._radius,
0,
null,
true,
Expand Down

0 comments on commit 3db0c5c

Please sign in to comment.