Change the first character of all end-of-line comments to upper case
This commit is contained in:
@ -7,13 +7,13 @@ import {AfterViewInit, Component, ElementRef, Input, OnInit, ViewChild} from '@a
|
||||
})
|
||||
export class ImgMagnifierComponent implements OnInit, AfterViewInit {
|
||||
|
||||
@Input() src: string; // image source
|
||||
@Input() zoom: number; // zoom level
|
||||
@Input() magnifierSize: {width: number, height: number}; // size of the magnifier
|
||||
@Input() src: string; // Image source
|
||||
@Input() zoom: number; // Zoom level
|
||||
@Input() magnifierSize: {width: number, height: number}; // Size of the magnifier
|
||||
@ViewChild('mainImg') mainImg: ElementRef;
|
||||
|
||||
backgroundSize;
|
||||
magnifierPos = {x: 0, y: 0}; // position of the magnifier
|
||||
magnifierPos = {x: 0, y: 0}; // Position of the magnifier
|
||||
showMagnifier = false;
|
||||
|
||||
constructor(
|
||||
@ -29,7 +29,7 @@ export class ImgMagnifierComponent implements OnInit, AfterViewInit {
|
||||
}, 1);
|
||||
}
|
||||
|
||||
calcPos(event) { // calculate the current magnifier position
|
||||
calcPos(event) { // Calculate the current magnifier position
|
||||
const img = this.mainImg.nativeElement.getBoundingClientRect();
|
||||
this.magnifierPos.x = Math.min(
|
||||
img.width - this.magnifierSize.width,
|
||||
|
Reference in New Issue
Block a user