File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
packages/uui-loader-circle/lib Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import { css , html , LitElement } from 'lit' ;
2
- import { property , query } from 'lit/decorators.js' ;
2
+ import { property } from 'lit/decorators.js' ;
3
3
import { styleMap } from 'lit/directives/style-map.js' ;
4
4
5
5
/**
@@ -88,6 +88,9 @@ export class UUILoaderCircleElement extends LitElement {
88
88
font-size: 0.3em;
89
89
font-weight: 700;
90
90
text-align: center;
91
+
92
+ /* Center the text */
93
+ padding-top: 0.09em;
91
94
}
92
95
` ,
93
96
] ;
@@ -118,22 +121,19 @@ export class UUILoaderCircleElement extends LitElement {
118
121
@property ( { type : Boolean , reflect : true , attribute : 'show-progress' } )
119
122
showProgress = false ;
120
123
121
- @query ( '#svg-container' )
122
- private _container : any ;
123
-
124
124
private _resizeObserver = new ResizeObserver ( ( ) => this . onResize ( ) ) ;
125
125
private _isLarge = false ;
126
126
127
127
firstUpdated ( ) {
128
- this . _resizeObserver . observe ( this . _container ) ;
128
+ this . _resizeObserver . observe ( this ) ;
129
129
}
130
130
131
131
disconnectedCallback ( ) {
132
132
this . _resizeObserver . disconnect ( ) ;
133
133
}
134
134
135
135
onResize ( ) {
136
- const newIsLarge = Number . parseFloat ( this . _container . clientHeight ) >= 30 ;
136
+ const newIsLarge = this . clientHeight >= 30 ;
137
137
138
138
if ( this . _isLarge != newIsLarge ) {
139
139
this . _isLarge = newIsLarge ;
You can’t perform that action at this time.
0 commit comments