update angular to 13.1.0

This commit is contained in:
2022-03-20 07:58:48 +01:00
parent 35df9e1fd2
commit 390407f2ed
37 changed files with 14907 additions and 6770 deletions

View File

@@ -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();