diff --git a/plugins/arcgis/service/src/EventDeletionHandler.ts b/plugins/arcgis/service/src/EventDeletionHandler.ts index 305485edd..691c69072 100644 --- a/plugins/arcgis/service/src/EventDeletionHandler.ts +++ b/plugins/arcgis/service/src/EventDeletionHandler.ts @@ -34,6 +34,10 @@ export class EventDeletionHandler { this._config = config; } + public updateConfig(newConfig: ArcGISPluginConfig): void { + this._config = newConfig; + } + /** * * @param activeEvents The current set of active events. diff --git a/plugins/arcgis/service/src/ObservationProcessor.ts b/plugins/arcgis/service/src/ObservationProcessor.ts index f925a755e..5abbc4ca4 100644 --- a/plugins/arcgis/service/src/ObservationProcessor.ts +++ b/plugins/arcgis/service/src/ObservationProcessor.ts @@ -178,11 +178,10 @@ export class ObservationProcessor { if (this._previousConfig == null || this._previousConfig != configJson) { this._transformer = new ObservationsTransformer(config, console); this._geometryChangeHandler = new GeometryChangedHandler(this._transformer); - this._eventDeletionHandler = new EventDeletionHandler(this._console, config); + this._eventDeletionHandler.updateConfig(config); this._layerProcessors = []; await this.getFeatureServiceLayers(config); this._previousConfig = configJson - this._firstRun = true; } return config } @@ -192,7 +191,6 @@ export class ObservationProcessor { */ async start() { this._isRunning = true; - this._firstRun = true; this.processAndScheduleNext(); }