diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts index 8a782a14a2..f01ffa3883 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/scada/scada-symbol.models.ts @@ -52,6 +52,7 @@ import { isUndefined, isUndefinedOrNull, mergeDeep, + mergeDeepIgnoreArray, parseFunction } from '@core/utils'; import { BehaviorSubject, forkJoin, Observable, Observer, of, Subject } from 'rxjs'; @@ -564,7 +565,7 @@ export class ScadaSymbolObject { const doc: XMLDocument = new DOMParser().parseFromString(this.svgContent, 'image/svg+xml'); this.metadata = parseScadaSymbolMetadataFromDom(doc); const defaults = defaultScadaSymbolObjectSettings(this.metadata); - this.settings = mergeDeep({} as ScadaSymbolObjectSettings, + this.settings = mergeDeepIgnoreArray({} as ScadaSymbolObjectSettings, defaults, this.inputSettings || {} as ScadaSymbolObjectSettings); this.prepareMetadata(); this.prepareSvgShape(doc); diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/scada/scada-symbol-object-settings.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/scada/scada-symbol-object-settings.component.ts index 58afec4523..8f4b19d4b4 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/scada/scada-symbol-object-settings.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/settings/common/scada/scada-symbol-object-settings.component.ts @@ -48,7 +48,7 @@ import { } from '@home/components/widget/lib/scada/scada-symbol.models'; import { IAliasController } from '@core/api/widget-api.models'; import { TargetDevice, widgetType } from '@shared/models/widget.models'; -import { isDefinedAndNotNull, mergeDeep } from '@core/utils'; +import { isDefinedAndNotNull, mergeDeepIgnoreArray } from '@core/utils'; import { ScadaSymbolBehaviorGroup, ScadaSymbolPropertyRow, @@ -288,7 +288,7 @@ export class ScadaSymbolObjectSettingsComponent implements OnInit, OnChanges, Co private setupValue() { if (this.metadata) { const defaults = defaultScadaSymbolObjectSettings(this.metadata); - this.modelValue = mergeDeep(defaults, this.modelValue); + this.modelValue = mergeDeepIgnoreArray(defaults, this.modelValue); this.scadaSymbolObjectSettingsFormGroup.patchValue( this.modelValue, {emitEvent: false} );