Skip to content

Commit ba779e8

Browse files
autoscroll on expand, only when in portrait mode
1 parent 99c8909 commit ba779e8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

js/app.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,10 @@ $(window).ready(function() {
6969
listScroll.refresh();
7070

7171
// auto scroll when expanding an item
72-
var eName = "." + e.parent().attr('class') + " ." + e.attr('class').match(/vehicle\d+/)[0];
73-
listScroll.scrollToElement(eName);
72+
if($('.portrait:visible').length) {
73+
var eName = "." + e.parent().attr('class') + " ." + e.attr('class').match(/vehicle\d+/)[0];
74+
listScroll.scrollToElement(eName);
75+
}
7476

7577
// pan to selected vehicle
7678
panTo(parseInt(e.attr('class').match(/vehicle(\d+)/)[1]));
@@ -129,9 +131,11 @@ $(window).ready(function() {
129131
field.attr('disabled','disabled');
130132
e.removeClass('off').addClass('on');
131133

132-
// push listen doc to habitat
134+
// push listener doc to habitat
135+
// this gets a station on the map, under the car marker
136+
// im still not sure its nessesary
133137
if(!CHASE_listenerSent) {
134-
ChaseCar.putListenerInfo(callsign);
138+
//ChaseCar.putListenerInfo(callsign);
135139
CHASE_listenerSent = true;
136140
}
137141
// if already have a position push it to habitat

0 commit comments

Comments
 (0)