Skip to content

Commit 5da8369

Browse files
committed
More tweaks to scroll-to-list (still doesnt work)
1 parent eff8aa0 commit 5da8369

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

js/tracker.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1750,12 +1750,14 @@ function addPosition(position) {
17501750
title: position.type + ' ' + vcallsign,
17511751
});
17521752

1753+
// Scroll list stuff here.
17531754
google.maps.event.addDomListener(marker, 'click', function() {
17541755
$(".row.active").removeClass('active');
17551756
_vehicle_id = marker.title.split(' ')[1];
17561757
_vehicle_idname = ".vehicle"+vehicles[_vehicle_id].uuid;
17571758
$(_vehicle_idname).addClass('active');
1758-
listScroll.scrollToElement(_vehicle_idname, null, true);
1759+
listScroll.refresh();
1760+
listScroll.scrollToElement(_vehicle_idname);
17591761
followVehicle($(_vehicle_idname).attr('data-vcallsign'));
17601762
});
17611763

serve.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env python3
2+
from http.server import HTTPServer, SimpleHTTPRequestHandler, test
3+
import sys
4+
5+
class CORSRequestHandler (SimpleHTTPRequestHandler):
6+
def end_headers (self):
7+
self.send_header('Access-Control-Allow-Origin', '*')
8+
SimpleHTTPRequestHandler.end_headers(self)
9+
10+
if __name__ == '__main__':
11+
test(CORSRequestHandler, HTTPServer, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000)

0 commit comments

Comments
 (0)