mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
Fix workaround for Safari which still has old property name in sl-progress-ring (#914)
This commit is contained in:
@@ -43,7 +43,7 @@ export default class SlProgressRing extends ShoelaceElement {
|
||||
// change, possibly because of a mix of pixel + unit-less values in the calc() function. It seems like a Safari bug,
|
||||
// but I couldn't pinpoint it so this works around the problem.
|
||||
//
|
||||
if (changedProps.has('percentage')) {
|
||||
if (changedProps.has('value')) {
|
||||
const radius = parseFloat(getComputedStyle(this.indicator).getPropertyValue('r'));
|
||||
const circumference = 2 * Math.PI * radius;
|
||||
const offset = circumference - (this.value / 100) * circumference;
|
||||
|
||||
Reference in New Issue
Block a user