Skip to content

Commit 5a6a615

Browse files
committed
remove deprecated fns
1 parent d13ab9f commit 5a6a615

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

apps/fxc-front/src/app/components/3d/map3d-element.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import './tracking3d-element';
77

88
import Basemap from '@arcgis/core/Basemap';
99
import esriConfig from '@arcgis/core/config';
10+
import { watch } from '@arcgis/core/core/reactiveUtils.js';
1011
import Point from '@arcgis/core/geometry/Point';
1112
import BaseElevationLayer from '@arcgis/core/layers/BaseElevationLayer';
1213
import ElevationLayer from '@arcgis/core/layers/ElevationLayer';
@@ -199,11 +200,14 @@ export class Map3dElement extends connect(store)(LitElement) {
199200
this.view = view;
200201
this.createLighting();
201202

202-
view.watch('popup.visible', (visible) => {
203-
if (visible == false) {
204-
store.dispatch(setCurrentLiveId(undefined));
205-
}
206-
});
203+
watch(
204+
() => view.popup?.visible,
205+
(visible) => {
206+
if (visible == false) {
207+
store.dispatch(setCurrentLiveId(undefined));
208+
}
209+
},
210+
);
207211
if (view.popup) {
208212
view.popup.viewModel.includeDefaultActions = false;
209213
}
@@ -244,7 +248,10 @@ export class Map3dElement extends connect(store)(LitElement) {
244248
this.center({ ...location, alt: 0 }, zoom);
245249
}
246250

247-
view.watch('center', (point: Point) => this.handleLocation({ lat: point.latitude!, lon: point.longitude! }));
251+
watch(
252+
() => view.center,
253+
(point: Point) => this.handleLocation({ lat: point.latitude!, lon: point.longitude! }),
254+
);
248255
})
249256
.catch(async (e) => {
250257
store.dispatch(setApiLoading(false));

0 commit comments

Comments
 (0)