Skip to content

Commit 4adc526

Browse files
committed
Zoom to payload if we are filtered
1 parent 85af407 commit 4adc526

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/tracker.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,10 +3062,12 @@ function update(response) {
30623062
offline.set('positions', ctx.lastPositions);
30633063

30643064
if (got_positions && !zoomed_in && Object.keys(vehicles).length) {
3065-
// Enable zooming when we only have a single payload filtered.
3066-
if(Object.keys(vehicles).length == 1){
3065+
// Enable zooming when we only have a single payload filtered.
3066+
if(wvar.query !== "") {
30673067
zoom_on_payload();
30683068
}
3069+
// TODO: Zoom to geolocation position
3070+
30693071
}
30703072

30713073
if(periodical_predictions === null) refreshPredictions();

0 commit comments

Comments
 (0)