15 lines
418 B
JavaScript
15 lines
418 B
JavaScript
Tracker.autorun(function() {
|
|
var id = Session.get('controller_id');
|
|
if (id) {
|
|
Meteor.subscribe("sensor_data", id);
|
|
Meteor.subscribe("controller_state", id);
|
|
Meteor.subscribe('pictures', id);
|
|
}
|
|
window.addEventListener('orientationchange', function(){
|
|
Session.set("orientation", new Date());
|
|
});
|
|
window.addEventListener('resize', function(){
|
|
Session.set("resized", new Date());
|
|
});
|
|
});
|