From 929bda33348e63c982c094434e50a0054d50c1a9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 15 Feb 2024 05:20:51 +0100 Subject: [PATCH] fix(progress radia) : fix zoom size --- .../progress-radial/progress-radial.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/progress-radial/progress-radial.tsx b/src/components/progress-radial/progress-radial.tsx index 97decb7a..53d0ca0f 100644 --- a/src/components/progress-radial/progress-radial.tsx +++ b/src/components/progress-radial/progress-radial.tsx @@ -6,19 +6,18 @@ import { Component, Prop, ComponentInterface, h } from '@stencil/core'; shadow: true }) export class ProgressRadial implements ComponentInterface { + initialSize: number = 120; @Prop() size: number = 120; @Prop() showLabel: boolean = false; @Prop() value: number = 0; render() { - const { size, halfSize } = { size: this.size, halfSize: this.size / 2 }; + const { initialSize ,halfSize } = { initialSize: 120, halfSize: this.initialSize / 2 }; return ( -
+
@@ -35,7 +34,14 @@ export class ProgressRadial implements ComponentInterface { getSvgStyle() { return { 'stroke-dasharray': '339.292', - 'stroke-dashoffset': `${339.292 - (this.value / 100) * 339.292}` + 'stroke-dashoffset': `${339.292 - (this.value / 100) * 339.292}`, + }; + } + + getSize() { + return { + 'width': `${(this.size)}px`, + 'height': `${(this.size)}px`, }; } } -- GitLab