diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/weather/wind-speed-direction-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/weather/wind-speed-direction-widget.component.ts
index 4ce5cf21d7..929f41fe48 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/weather/wind-speed-direction-widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/weather/wind-speed-direction-widget.component.ts
@@ -42,7 +42,6 @@ import {
getSingleTsValueByDataKey,
overlayStyle
} from '@shared/models/widget-settings.models';
-import { WidgetComponent } from '@home/components/widget/widget.component';
import { formatValue, isDefinedAndNotNull, isNumeric } from '@core/utils';
import { ResizeObserver } from '@juggle/resize-observer';
import { Path, Svg, SVG, Text } from '@svgdotjs/svg.js';
@@ -92,6 +91,7 @@ export class WindSpeedDirectionWidgetComponent implements OnInit, OnDestroy, Aft
backgroundStyle$: Observable;
overlayStyle: ComponentStyle = {};
+ padding: string;
shapeResize$: ResizeObserver;
@@ -111,8 +111,7 @@ export class WindSpeedDirectionWidgetComponent implements OnInit, OnDestroy, Aft
private windDirection = 0;
private centerValueText = 'N/A';
- constructor(private widgetComponent: WidgetComponent,
- private imagePipe: ImagePipe,
+ constructor(private imagePipe: ImagePipe,
private sanitizer: DomSanitizer,
private renderer: Renderer2,
private cd: ChangeDetectorRef) {
@@ -142,6 +141,7 @@ export class WindSpeedDirectionWidgetComponent implements OnInit, OnDestroy, Aft
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
+ this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
this.hasCardClickAction = this.ctx.actionsApi.getActionDescriptors('cardClick').length > 0;
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/weather/wind-speed-direction-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/weather/wind-speed-direction-widget.models.ts
index 7801f80a17..5daa9e3d68 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/weather/wind-speed-direction-widget.models.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/weather/wind-speed-direction-widget.models.ts
@@ -14,7 +14,6 @@
/// limitations under the License.
///
-import { BatteryLevelLayout } from '@home/components/widget/lib/indicator/battery-level-widget.models';
import {
BackgroundSettings,
BackgroundType,
@@ -59,6 +58,7 @@ export interface WindSpeedDirectionWidgetSettings {
minorTicksColor: string;
minorTicksFont: Font;
background: BackgroundSettings;
+ padding: string
}
export const windSpeedDirectionDefaultSettings: WindSpeedDirectionWidgetSettings = {
@@ -101,5 +101,6 @@ export const windSpeedDirectionDefaultSettings: WindSpeedDirectionWidgetSettings
color: 'rgba(255,255,255,0.72)',
blur: 3
}
- }
+ },
+ padding: ''
};