Skip to content

Commit

Permalink
Revert "feat(layerSync): prevent refresh of linked layer if applied O…
Browse files Browse the repository at this point in the history
…GC filters are the same (#1027)"

This reverts commit f4affea.
  • Loading branch information
pelord authored Mar 31, 2022
1 parent b262c9d commit 6e2dd8b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/geo/src/lib/layer/utils/layerSync-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,7 @@ export class LayerSyncWatcher extends Watcher {
const layerType = layerToApply.ol.getProperties().sourceOptions.type;
(layerToApply.dataSource as OgcFilterableDataSource).setOgcFilters(ogcFilters, false);
if (layerType === 'wfs') {
if (ogcFilters !== (layerToApply.dataSource as OgcFilterableDataSource).ogcFilters$.value) {
layerToApply.ol.getSource().refresh();
}
layerToApply.ol.getSource().refresh();
}
if (layerType === 'wms') {
let appliedOgcFilter;
Expand Down Expand Up @@ -203,10 +201,8 @@ export class LayerSyncWatcher extends Watcher {
l.bidirectionnal !== false && l.linkedIds.indexOf(currentLinkedId) !== -1) {
const layerType = layer.ol.getProperties().sourceOptions.type;
if (layerType === 'wfs') {
if (ogcFilters !== (layer.dataSource as OgcFilterableDataSource).ogcFilters$.value) {
(layer.dataSource as OgcFilterableDataSource).setOgcFilters(ogcFilters, true);
layer.ol.getSource().refresh();
}
(layer.dataSource as OgcFilterableDataSource).setOgcFilters(ogcFilters, true);
layer.ol.getSource().refresh();
}
if (layerType === 'wms') {
let appliedOgcFilter;
Expand Down

0 comments on commit 6e2dd8b

Please sign in to comment.