update angular to 13.1.0
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
[style.width]="zoomInSliderStyleWidth"
|
||||
></div>
|
||||
</div>
|
||||
<div *ngIf="showStats" class="plot-view-overlay">
|
||||
<div *ngIf="showStats && stats != null" class="plot-view-overlay">
|
||||
<pdb-plot-details [stats]="stats"></pdb-plot-details>
|
||||
<div class="top-right">
|
||||
<img
|
||||
|
||||
@@ -15,10 +15,10 @@ export class PlotViewComponent implements OnInit {
|
||||
readonly gnuplotBMargin = 76; // The bottom margin configured for gnuplot
|
||||
|
||||
|
||||
imageUrl : string;
|
||||
stats : PlotResponseStats;
|
||||
imageUrl! : string;
|
||||
stats: PlotResponseStats | null = null;
|
||||
|
||||
axes: AxesTypes;
|
||||
axes!: AxesTypes;
|
||||
|
||||
@Output()
|
||||
zoomRange : EventEmitter<SelectionRange> = new EventEmitter<SelectionRange>();
|
||||
@@ -49,20 +49,20 @@ export class PlotViewComponent implements OnInit {
|
||||
hideZoomInSlider() {
|
||||
this.zoomInSliderStyleDisplay = "none";
|
||||
}
|
||||
update_cursor(event){
|
||||
update_cursor(event: MouseEvent){
|
||||
//$('#result-image').css('cursor', this.isInPlot(event) ? 'crosshair' : 'default');
|
||||
this.imageCursor = this.isInPlot(event) ? 'crosshair' : 'default';
|
||||
}
|
||||
|
||||
imageWidth() {
|
||||
return Math.floor(document.getElementById('result-image').offsetWidth);
|
||||
return Math.floor(document.getElementById('result-image')!.offsetWidth);
|
||||
}
|
||||
|
||||
imageHeight() {
|
||||
return Math.floor(document.getElementById('result-image').offsetHeight);
|
||||
return Math.floor(document.getElementById('result-image')!.offsetHeight);
|
||||
}
|
||||
|
||||
positionInImage(event) : any {
|
||||
positionInImage(event: MouseEvent) : any {
|
||||
const rect = (<HTMLImageElement>document.getElementById('result-image')).getBoundingClientRect();
|
||||
const x= event.clientX - rect.left;
|
||||
const y= event.clientY - rect.top;
|
||||
@@ -73,7 +73,7 @@ export class PlotViewComponent implements OnInit {
|
||||
return {x: x, y: y};
|
||||
}
|
||||
|
||||
isInPlot(event) : boolean{
|
||||
isInPlot(event: MouseEvent) : boolean{
|
||||
const pos = this.positionInImage(event);
|
||||
|
||||
return pos.x > this.gnuplotLMargin
|
||||
@@ -82,7 +82,7 @@ export class PlotViewComponent implements OnInit {
|
||||
&& pos.y < this.imageHeight()- this.gnuplotBMargin;
|
||||
}
|
||||
|
||||
isInImage(event) : boolean{
|
||||
isInImage(event: MouseEvent) : boolean{
|
||||
const pos = this.positionInImage(event);
|
||||
|
||||
return pos.x > 0
|
||||
@@ -91,7 +91,7 @@ export class PlotViewComponent implements OnInit {
|
||||
&& pos.y < this.imageHeight();
|
||||
}
|
||||
|
||||
dragStart(event) {
|
||||
dragStart(event: MouseEvent) {
|
||||
//console.log("dragStart inPlot: " + this.isInPlot(event));
|
||||
|
||||
event.preventDefault();
|
||||
@@ -104,7 +104,7 @@ export class PlotViewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
dragging(event) {
|
||||
dragging(event: MouseEvent) {
|
||||
//console.log("dragging " + this.isInPlot(event));
|
||||
|
||||
this.update_cursor(event);
|
||||
@@ -128,7 +128,7 @@ export class PlotViewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
dragStop(event) {
|
||||
dragStop(event: MouseEvent) {
|
||||
if (this.in_drag_mode){
|
||||
this.in_drag_mode = false;
|
||||
this.hideZoomInSlider();
|
||||
@@ -152,7 +152,7 @@ export class PlotViewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
dragAbort(event) {
|
||||
dragAbort(event: MouseEvent) {
|
||||
//console.log("drag_abort");
|
||||
if (this.in_drag_mode && !this.isInImage(event)) {
|
||||
this.in_drag_mode = false;
|
||||
@@ -162,7 +162,7 @@ export class PlotViewComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
zoomByScroll(event) {
|
||||
zoomByScroll(event: WheelEvent) {
|
||||
if (this.isInImage(event) && event.deltaY != 0 && this.axes.hasXAxis(DataType.Time)) {
|
||||
this.in_drag_mode = false;
|
||||
this.hideZoomInSlider();
|
||||
|
||||
Reference in New Issue
Block a user