File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 66 </div >
77 <p >{{ props.paragraph }}</p >
88 <q-card
9- v-if =" activePoint && Object.keys(activePoint.properties).length"
9+ v-if =" activePoint?.properties && Object.keys(activePoint.properties).length"
1010 class =" selected-point q-pa-sm q-ma-sm"
1111 flat
1212 bordered
Original file line number Diff line number Diff line change @@ -297,9 +297,14 @@ const clickMap = (coordinates) => {
297297};
298298
299299const getWatershedFromLngLat = (point ) => {
300- activePoint .value = [point[1 ], point[0 ]];
301- clickedPoint .value = { lng: point[1 ], lat: point[0 ] };
302- getWatershedInfoAtLngLat ({lng: activePoint .value [0 ], lat: activePoint .value [1 ]});
300+ if (point? .latitude ) {
301+ activePoint .value = [point .longitude , point .latitude ];
302+ clickedPoint .value = { lng: point .longitude , lat: point .latitude };
303+ } else {
304+ activePoint .value = [point[1 ], point[0 ]];
305+ clickedPoint .value = { lng: point[1 ], lat: point[0 ] };
306+ getWatershedInfoAtLngLat ({lng: activePoint .value [0 ], lat: activePoint .value [1 ]});
307+ }
303308};
304309
305310const getWatershedInfoAtLngLat = async (coordinates ) => {
You can’t perform that action at this time.
0 commit comments