2016-10-15 15:58:41 +02:00
|
|
|
Tracker.autorun(function() {
|
2016-03-06 09:20:36 +01:00
|
|
|
var id = Session.get('controller_id');
|
2017-05-24 18:45:37 +02:00
|
|
|
Session.set("orientation", new Date());
|
|
|
|
|
Session.set("resize", new Date());
|
2016-03-06 09:20:36 +01:00
|
|
|
if (id) {
|
|
|
|
|
Meteor.subscribe("sensor_data", id);
|
2016-10-08 16:02:59 +02:00
|
|
|
Meteor.subscribe("controller_state", id);
|
|
|
|
|
Meteor.subscribe('pictures', id);
|
2016-03-06 09:20:36 +01:00
|
|
|
}
|
2017-05-21 17:51:45 +02:00
|
|
|
window.addEventListener('orientationchange', function(){
|
|
|
|
|
Session.set("orientation", new Date());
|
|
|
|
|
});
|
|
|
|
|
window.addEventListener('resize', function(){
|
2017-05-24 18:45:37 +02:00
|
|
|
Session.set("resize", new Date());
|
2017-05-21 17:51:45 +02:00
|
|
|
});
|
2016-03-06 09:20:36 +01:00
|
|
|
});
|