Skip to content

Commit a99c24b

Browse files
committed
Scroll and follow on balloon marker click.
1 parent 532f51a commit a99c24b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

js/tracker.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,12 @@ function addPosition(position) {
16951695

16961696
google.maps.event.addDomListener(marker, 'click', function() {
16971697
$(".row.active").removeClass('active');
1698-
$(".vehicle"+vehicles[marker.title].uuid).addClass('active');
1698+
_vehicle_id = marker.title.split(' ')[1];
1699+
_vehicle_idname = ".vehicle"+vehicles[_vehicle_id].uuid;
1700+
$(_vehicle_idname).addClass('active');
1701+
listScroll.scrollToElement(_vehicle_idname);
1702+
followVehicle($(_vehicle_idname).attr('data-vcallsign'));
1703+
16991704
});
17001705

17011706
gmaps_elements.push(marker);

0 commit comments

Comments
 (0)