Browse Source

UI: Optimize code to override overlay padding in widgets

pull/10572/head
Vladyslav_Prykhodko 2 years ago
parent
commit
7ac88d807c
  1. 3
      ui-ngx/src/app/modules/home/components/widget/lib/button/toggle-button-widget.component.html
  2. 4
      ui-ngx/src/app/modules/home/components/widget/lib/button/toggle-button-widget.component.ts
  3. 3
      ui-ngx/src/app/modules/home/components/widget/lib/cards/aggregated-value-card-widget.component.html
  4. 4
      ui-ngx/src/app/modules/home/components/widget/lib/cards/aggregated-value-card-widget.component.ts
  5. 3
      ui-ngx/src/app/modules/home/components/widget/lib/cards/progress-bar-widget.component.html
  6. 4
      ui-ngx/src/app/modules/home/components/widget/lib/cards/progress-bar-widget.component.ts
  7. 3
      ui-ngx/src/app/modules/home/components/widget/lib/cards/value-chart-card-widget.component.html
  8. 4
      ui-ngx/src/app/modules/home/components/widget/lib/cards/value-chart-card-widget.component.ts
  9. 3
      ui-ngx/src/app/modules/home/components/widget/lib/chart/bar-chart-with-labels-widget.component.html
  10. 4
      ui-ngx/src/app/modules/home/components/widget/lib/chart/bar-chart-with-labels-widget.component.ts
  11. 3
      ui-ngx/src/app/modules/home/components/widget/lib/chart/latest-chart.component.html
  12. 4
      ui-ngx/src/app/modules/home/components/widget/lib/chart/latest-chart.component.ts
  13. 3
      ui-ngx/src/app/modules/home/components/widget/lib/chart/range-chart-widget.component.html
  14. 4
      ui-ngx/src/app/modules/home/components/widget/lib/chart/range-chart-widget.component.ts
  15. 3
      ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart-widget.component.html
  16. 4
      ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart-widget.component.scss
  17. 4
      ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart-widget.component.ts
  18. 4
      ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.html
  19. 4
      ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts
  20. 4
      ui-ngx/src/app/modules/home/components/widget/lib/indicator/liquid-level-widget.component.html
  21. 4
      ui-ngx/src/app/modules/home/components/widget/lib/indicator/liquid-level-widget.component.ts
  22. 4
      ui-ngx/src/app/modules/home/components/widget/lib/indicator/signal-strength-widget.component.html
  23. 4
      ui-ngx/src/app/modules/home/components/widget/lib/indicator/signal-strength-widget.component.ts
  24. 3
      ui-ngx/src/app/modules/home/components/widget/lib/rpc/power-button-widget.component.html
  25. 4
      ui-ngx/src/app/modules/home/components/widget/lib/rpc/power-button-widget.component.ts
  26. 3
      ui-ngx/src/app/modules/home/components/widget/lib/rpc/slider-widget.component.html
  27. 4
      ui-ngx/src/app/modules/home/components/widget/lib/rpc/slider-widget.component.ts

3
ui-ngx/src/app/modules/home/components/widget/lib/button/toggle-button-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-toggle-button-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-toggle-button-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-toggle-button-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div class="tb-toggle-button-container"

4
ui-ngx/src/app/modules/home/components/widget/lib/button/toggle-button-widget.component.ts

@ -40,7 +40,6 @@ export class ToggleButtonWidgetComponent extends
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
value = false;
@ -70,8 +69,7 @@ export class ToggleButtonWidgetComponent extends
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
const getInitialStateSettings =
{...this.settings.initialState, actionLabel: this.ctx.translate.instant('widgets.rpc-state.initial-state')};

3
ui-ngx/src/app/modules/home/components/widget/lib/cards/aggregated-value-card-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-aggregated-value-card-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-aggregated-value-card-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-aggregated-value-card-overlay" [style]="overlayStyle"></div>
<div class="tb-aggregated-value-card-title-panel">
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>

4
ui-ngx/src/app/modules/home/components/widget/lib/cards/aggregated-value-card-widget.component.ts

@ -106,7 +106,6 @@ export class AggregatedValueCardWidgetComponent implements OnInit, AfterViewInit
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
private lineChart: TbTimeSeriesChart;
@ -171,8 +170,7 @@ export class AggregatedValueCardWidgetComponent implements OnInit, AfterViewInit
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
}
ngAfterViewInit(): void {

3
ui-ngx/src/app/modules/home/components/widget/lib/cards/progress-bar-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div #progressBarPanel class="tb-progress-bar-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div #progressBarPanel class="tb-progress-bar-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-progress-bar-overlay" [style]="overlayStyle"></div>
<div #progressBarContainer class="tb-progress-bar-container" [class]="layoutClass">
<ng-container *ngIf="layout === progressBarLayout.default">

4
ui-ngx/src/app/modules/home/components/widget/lib/cards/progress-bar-widget.component.ts

@ -98,7 +98,6 @@ export class ProgressBarWidgetComponent implements OnInit, OnDestroy, AfterViewI
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
progressBarPanelResize$: ResizeObserver;
@ -153,8 +152,7 @@ export class ProgressBarWidgetComponent implements OnInit, OnDestroy, AfterViewI
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
}
ngAfterViewInit() {

3
ui-ngx/src/app/modules/home/components/widget/lib/cards/value-chart-card-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-value-chart-card-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-value-chart-card-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-value-chart-card-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div #valueChartCardContent class="tb-value-chart-card-content" [class]="layout" [class.auto-scale]="autoScale && showValue">

4
ui-ngx/src/app/modules/home/components/widget/lib/cards/value-chart-card-widget.component.ts

@ -98,7 +98,6 @@ export class ValueChartCardWidgetComponent implements OnInit, AfterViewInit, OnD
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
private lineChart: TbTimeSeriesChart;
@ -148,8 +147,7 @@ export class ValueChartCardWidgetComponent implements OnInit, AfterViewInit, OnD
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
if (this.ctx.defaultSubscription.firstDatasource?.dataKeys?.length) {
this.lineChartDataKey = this.ctx.defaultSubscription.firstDatasource?.dataKeys[0];

3
ui-ngx/src/app/modules/home/components/widget/lib/chart/bar-chart-with-labels-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-bar-chart-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-bar-chart-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-bar-chart-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div class="tb-bar-chart-content" [class]="legendClass">

4
ui-ngx/src/app/modules/home/components/widget/lib/chart/bar-chart-with-labels-widget.component.ts

@ -65,7 +65,6 @@ export class BarChartWithLabelsWidgetComponent implements OnInit, OnDestroy, Aft
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
legendKeys: DataKey[];
@ -86,8 +85,7 @@ export class BarChartWithLabelsWidgetComponent implements OnInit, OnDestroy, Aft
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
this.showLegend = this.settings.showLegend;

3
ui-ngx/src/app/modules/home/components/widget/lib/chart/latest-chart.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-latest-chart-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-latest-chart-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-latest-chart-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div #chartContent class="tb-latest-chart-content" [class]="legendClass">

4
ui-ngx/src/app/modules/home/components/widget/lib/chart/latest-chart.component.ts

@ -83,7 +83,6 @@ export class LatestChartComponent implements OnInit, OnDestroy, AfterViewInit {
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
get legendItems(): LatestChartLegendItem[] {
@ -113,8 +112,7 @@ export class LatestChartComponent implements OnInit, OnDestroy, AfterViewInit {
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
if (this.showLegend) {
this.legendClass = `legend-${this.settings.legendPosition}`;

3
ui-ngx/src/app/modules/home/components/widget/lib/chart/range-chart-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-range-chart-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-range-chart-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-range-chart-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div class="tb-range-chart-content" [class]="legendClass">

4
ui-ngx/src/app/modules/home/components/widget/lib/chart/range-chart-widget.component.ts

@ -73,7 +73,6 @@ export class RangeChartWidgetComponent implements OnInit, OnDestroy, AfterViewIn
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
legendLabelStyle: ComponentStyle;
@ -112,8 +111,7 @@ export class RangeChartWidgetComponent implements OnInit, OnDestroy, AfterViewIn
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
this.rangeItems = toRangeItems(this.settings.rangeColors);
this.visibleRangeItems = this.rangeItems.filter(item => item.visible);

3
ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-time-series-chart-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-time-series-chart-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-time-series-chart-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div class="tb-time-series-chart-content" [class]="legendClass">

4
ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart-widget.component.scss

@ -24,9 +24,7 @@ $maxLegendHeight: 35%;
display: flex;
flex-direction: column;
gap: 8px;
&.overlay {
padding: 20px 24px 24px 24px;
}
padding: 20px 24px 24px 24px;
> div:not(.tb-time-series-chart-overlay) {
z-index: 1;
}

4
ui-ngx/src/app/modules/home/components/widget/lib/chart/time-series-chart-widget.component.ts

@ -73,7 +73,6 @@ export class TimeSeriesChartWidgetComponent implements OnInit, OnDestroy, AfterV
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
legendColumnTitleStyle: ComponentStyle;
@ -97,8 +96,7 @@ export class TimeSeriesChartWidgetComponent implements OnInit, OnDestroy, AfterV
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
this.showLegend = this.settings.showLegend;
if (this.showLegend) {

4
ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.html

@ -15,8 +15,8 @@
limitations under the License.
-->
<div class="tb-battery-level-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async" [class.tb-battery-level-pointer]="hasCardClickAction" (click)="cardClick($event)">
<div class="tb-battery-level-panel" [style.padding]="padding" [style]="backgroundStyle$ | async"
[class.tb-battery-level-pointer]="hasCardClickAction" (click)="cardClick($event)">
<div class="tb-battery-level-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div #batteryLevelContent class="tb-battery-level-content" [class]="layoutClass">

4
ui-ngx/src/app/modules/home/components/widget/lib/indicator/battery-level-widget.component.ts

@ -132,7 +132,6 @@ export class BatteryLevelWidgetComponent implements OnInit, OnDestroy, AfterView
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
batteryBoxResize$: ResizeObserver;
@ -216,8 +215,7 @@ export class BatteryLevelWidgetComponent implements OnInit, OnDestroy, AfterView
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
this.hasCardClickAction = this.ctx.actionsApi.getActionDescriptors('cardClick').length > 0;

4
ui-ngx/src/app/modules/home/components/widget/lib/indicator/liquid-level-widget.component.html

@ -15,8 +15,8 @@
limitations under the License.
-->
<div class="tb-liquid-level-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async" [class.tb-liquid-level-pointer]="hasCardClickAction" (click)="cardClick($event)">
<div class="tb-liquid-level-panel" [style.padding]="padding" [style]="backgroundStyle$ | async"
[class.tb-liquid-level-pointer]="hasCardClickAction" (click)="cardClick($event)">
<div class="tb-liquid-level-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div #liquidLevelContent class="tb-liquid-level-content"></div>

4
ui-ngx/src/app/modules/home/components/widget/lib/indicator/liquid-level-widget.component.ts

@ -81,7 +81,6 @@ export class LiquidLevelWidgetComponent implements OnInit {
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
hasCardClickAction = false;
@ -126,8 +125,7 @@ export class LiquidLevelWidgetComponent implements OnInit {
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
this.hasCardClickAction = this.ctx.actionsApi.getActionDescriptors('cardClick').length > 0;

4
ui-ngx/src/app/modules/home/components/widget/lib/indicator/signal-strength-widget.component.html

@ -15,8 +15,8 @@
limitations under the License.
-->
<div class="tb-signal-strength-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async" [class.tb-signal-strength-pointer]="hasCardClickAction" (click)="cardClick($event)">
<div class="tb-signal-strength-panel" [style.padding]="padding" [style]="backgroundStyle$ | async"
[class.tb-signal-strength-pointer]="hasCardClickAction" (click)="cardClick($event)">
<div class="tb-signal-strength-overlay" [style]="overlayStyle"></div>
<div *ngIf="widgetComponent.dashboardWidget.showWidgetTitlePanel || showDate" class="tb-signal-strength-title-panel">
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>

4
ui-ngx/src/app/modules/home/components/widget/lib/indicator/signal-strength-widget.component.ts

@ -125,7 +125,6 @@ export class SignalStrengthWidgetComponent implements OnInit, OnDestroy, AfterVi
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
shapeResize$: ResizeObserver;
@ -210,8 +209,7 @@ export class SignalStrengthWidgetComponent implements OnInit, OnDestroy, AfterVi
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
this.hasCardClickAction = this.ctx.actionsApi.getActionDescriptors('cardClick').length > 0;
}

3
ui-ngx/src/app/modules/home/components/widget/lib/rpc/power-button-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-power-button-panel" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-power-button-panel" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-power-button-overlay" [style]="overlayStyle"></div>
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>
<div class="tb-power-button-content">

4
ui-ngx/src/app/modules/home/components/widget/lib/rpc/power-button-widget.component.ts

@ -56,7 +56,6 @@ export class PowerButtonWidgetComponent extends
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
value = false;
@ -84,8 +83,7 @@ export class PowerButtonWidgetComponent extends
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
const getInitialStateSettings =
{...this.settings.initialState, actionLabel: this.ctx.translate.instant('widgets.rpc-state.initial-state')};

3
ui-ngx/src/app/modules/home/components/widget/lib/rpc/slider-widget.component.html

@ -15,8 +15,7 @@
limitations under the License.
-->
<div class="tb-slider-panel" [style.pointer-events]="ctx.isEdit ? 'none' : 'all'" [style.padding]="padding"
[class.overlay]="overlayEnabled" [style]="backgroundStyle$ | async">
<div class="tb-slider-panel" [style.pointer-events]="ctx.isEdit ? 'none' : 'all'" [style.padding]="padding" [style]="backgroundStyle$ | async">
<div class="tb-slider-overlay" [style]="overlayStyle"></div>
<div *ngIf="showWidgetTitlePanel" class="tb-slider-title-panel">
<ng-container *ngTemplateOutlet="widgetTitlePanel"></ng-container>

4
ui-ngx/src/app/modules/home/components/widget/lib/rpc/slider-widget.component.ts

@ -94,7 +94,6 @@ export class SliderWidgetComponent extends
backgroundStyle$: Observable<ComponentStyle>;
overlayStyle: ComponentStyle = {};
overlayEnabled: boolean;
padding: string;
value: number = null;
@ -147,8 +146,7 @@ export class SliderWidgetComponent extends
this.backgroundStyle$ = backgroundStyle(this.settings.background, this.imagePipe, this.sanitizer);
this.overlayStyle = overlayStyle(this.settings.background.overlay);
this.overlayEnabled = this.settings.background.overlay.enabled;
this.padding = this.overlayEnabled ? undefined : this.settings.padding;
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
this.layout = this.settings.layout;

Loading…
Cancel
Save