Begining of the style of info popin
for the jumps
This commit is contained in:
@@ -24,8 +24,7 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
];
|
||||
public dataSourceTable;
|
||||
public resultsLength = 0;
|
||||
private previousElementId = -1;
|
||||
private closePopin = false;
|
||||
private showPopinForItemId = -1;
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
|
||||
constructor(
|
||||
@@ -51,23 +50,16 @@ export class ListOfJumpsComponent implements OnInit {
|
||||
}
|
||||
|
||||
showPopin(event, item) {
|
||||
let elementId = item.id;
|
||||
this.showPopinForItemId = item.id;
|
||||
}
|
||||
|
||||
if (this.previousElementId == -1) {
|
||||
this.previousElementId = elementId;
|
||||
}
|
||||
|
||||
this.closePopin = (elementId === this.previousElementId);
|
||||
if (elementId != this.previousElementId) {
|
||||
this.previousElementId = elementId;
|
||||
}
|
||||
hidePopin(event, item) {
|
||||
this.showPopinForItemId = -1;
|
||||
}
|
||||
|
||||
calculateClasses(item) {
|
||||
return {
|
||||
'showPopin': !this.closePopin || item.id === this.previousElementId,
|
||||
'hidePopin': this.closePopin || item.id != this.previousElementId,
|
||||
'stylePopin': true
|
||||
'showPopin': this.showPopinForItemId != -1 && item.id === this.showPopinForItemId,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user