Skip to content

Commit c367d53

Browse files
authored
Merge pull request #125 from umbraco/bugfix/uui-loader-circle
2 parents 6331e28 + 9e07ae4 commit c367d53

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/uui-loader-circle/lib/uui-loader-circle.element.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { css, html, LitElement } from 'lit';
2-
import { property, query } from 'lit/decorators.js';
2+
import { property } from 'lit/decorators.js';
33
import { styleMap } from 'lit/directives/style-map.js';
44

55
/**
@@ -88,6 +88,9 @@ export class UUILoaderCircleElement extends LitElement {
8888
font-size: 0.3em;
8989
font-weight: 700;
9090
text-align: center;
91+
92+
/* Center the text */
93+
padding-top: 0.09em;
9194
}
9295
`,
9396
];
@@ -118,22 +121,19 @@ export class UUILoaderCircleElement extends LitElement {
118121
@property({ type: Boolean, reflect: true, attribute: 'show-progress' })
119122
showProgress = false;
120123

121-
@query('#svg-container')
122-
private _container: any;
123-
124124
private _resizeObserver = new ResizeObserver(() => this.onResize());
125125
private _isLarge = false;
126126

127127
firstUpdated() {
128-
this._resizeObserver.observe(this._container);
128+
this._resizeObserver.observe(this);
129129
}
130130

131131
disconnectedCallback() {
132132
this._resizeObserver.disconnect();
133133
}
134134

135135
onResize() {
136-
const newIsLarge = Number.parseFloat(this._container.clientHeight) >= 30;
136+
const newIsLarge = this.clientHeight >= 30;
137137

138138
if (this._isLarge != newIsLarge) {
139139
this._isLarge = newIsLarge;

0 commit comments

Comments
 (0)