Skip to content
Snippets Groups Projects
Commit 46d0b62c authored by Olabarrieta Palacios, Ignacio's avatar Olabarrieta Palacios, Ignacio
Browse files

a

parent 7a8bf2f9
Branches
No related tags found
No related merge requests found
...@@ -87,7 +87,7 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -87,7 +87,7 @@ export class BikeTrajectoryComponent implements OnInit {
console.log("radio_change::: viz_type="+this.viz_type+" markers.length="+Object.keys(this.markers).length); console.log("radio_change::: viz_type="+this.viz_type+" markers.length="+Object.keys(this.markers).length);
if ( this.viz_type == 0 ){ if ( this.viz_type == 0 ){
if ( Object.keys(this.markers).length == 0 ){ this.print_pnts(); } if ( Object.keys(this.markers).length == 0 ){ this.print_pnts(); }
this.get_day0(); this.get_day0_all();
document.getElementById('controls_env').style.display='block' document.getElementById('controls_env').style.display='block'
document.getElementById('safe_env').style.display='none'; document.getElementById('safe_env').style.display='none';
}else if ( this.viz_type == 1){ }else if ( this.viz_type == 1){
...@@ -224,6 +224,10 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -224,6 +224,10 @@ export class BikeTrajectoryComponent implements OnInit {
this.get_vels0(); this.get_vels0();
}else{ }else{
// console.log("change::: calling get_day0"); // console.log("change::: calling get_day0");
if ( this.city === "1" ){
this.get_day0_all();
}
else if ( this.city === "0"){
if ( this.dayLbls ){ if ( this.dayLbls ){
this.get0(); this.get0();
}else{ }else{
...@@ -231,6 +235,7 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -231,6 +235,7 @@ export class BikeTrajectoryComponent implements OnInit {
} }
} }
} }
}
dayChange() { dayChange() {
this.dayLbls = !this.dayLbls; this.dayLbls = !this.dayLbls;
...@@ -248,7 +253,11 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -248,7 +253,11 @@ export class BikeTrajectoryComponent implements OnInit {
document.getElementById('daySlider').style.display='block'; document.getElementById('daySlider').style.display='block';
document.getElementById('controls').style.display='none'; document.getElementById('controls').style.display='none';
//document.getElementById('info').style.display='none'; //document.getElementById('info').style.display='none';
if ( this.city === "0" ){
this.get_day0(); this.get_day0();
}else if ( this.city === "1"){
this.get_day0_all();
}
} }
} }
...@@ -367,6 +376,15 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -367,6 +376,15 @@ export class BikeTrajectoryComponent implements OnInit {
} }
} }
get_day0_all(): void {
if ( this.points_loaded ){
console.log(Date.now()+': get_day0_all::: in routine...this.day='+this.day);
let weekday = parseInt((<HTMLSelectElement> document.getElementById('weekday_select')).value);
let part_day = parseInt((<HTMLSelectElement> document.getElementById('day_select')).value);
this.bikeTrajectoryService.getDayAll(this.day,weekday,part_day).subscribe(res => this.process_result(res,0), err => console.log(err));
}
}
get0(): void { get0(): void {
let weekday = parseInt((<HTMLSelectElement> document.getElementById('weekday_select')).value); let weekday = parseInt((<HTMLSelectElement> document.getElementById('weekday_select')).value);
let part_day = parseInt((<HTMLSelectElement> document.getElementById('day_select')).value); let part_day = parseInt((<HTMLSelectElement> document.getElementById('day_select')).value);
...@@ -412,7 +430,11 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -412,7 +430,11 @@ export class BikeTrajectoryComponent implements OnInit {
console.log("get_pnts::: len(markers)=" + Object.keys(this.markers).length); console.log("get_pnts::: len(markers)=" + Object.keys(this.markers).length);
this.create_legend(clr_idx); this.create_legend(clr_idx);
this.points_loaded = true; this.points_loaded = true;
if ( this.city === "0" ){
this.get_day0(); this.get_day0();
}else if ( this.city === "1" ){
this.get_day0_all();
}
} }
create_his_config(id,lst){ create_his_config(id,lst){
...@@ -696,7 +718,11 @@ export class BikeTrajectoryComponent implements OnInit { ...@@ -696,7 +718,11 @@ export class BikeTrajectoryComponent implements OnInit {
console.log(Date.now()+": slider_change in routine:::"); console.log(Date.now()+": slider_change in routine:::");
this.day = this.fromValtoDay(this.sliderValue); this.day = this.fromValtoDay(this.sliderValue);
const dateDay = new Date(this.sliderValue * 1000); const dateDay = new Date(this.sliderValue * 1000);
if ( this.city === "0" ){
this.get_day0(); this.get_day0();
}else if ( this.city === "1" ){
this.get_day0_all();
}
} }
openInstructions() { openInstructions() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment