diff --git a/desktop/src/app/image/image.component.ts b/desktop/src/app/image/image.component.ts index 9dfd71e89..90f3cffb7 100644 --- a/desktop/src/app/image/image.component.ts +++ b/desktop/src/app/image/image.component.ts @@ -344,8 +344,8 @@ export class ImageComponent implements AfterViewInit, OnDestroy { const { scale } = this.panZoom!.getTransform() - var x = parseFloat(target.getAttribute('data-x')) || 0 - var y = parseFloat(target.getAttribute('data-y')) || 0 + let x = parseFloat(target.getAttribute('data-x')) || 0 + let y = parseFloat(target.getAttribute('data-y')) || 0 target.style.width = event.rect.width / scale + 'px' target.style.height = event.rect.height / scale + 'px' diff --git a/desktop/src/shared/components/moon/moon.component.ts b/desktop/src/shared/components/moon/moon.component.ts index c18066b2d..a3e9e7a40 100644 --- a/desktop/src/shared/components/moon/moon.component.ts +++ b/desktop/src/shared/components/moon/moon.component.ts @@ -58,7 +58,7 @@ export class MoonComponent implements AfterViewInit, OnChanges { for (let a = 0; a < 180; a++) { const angle = (a - 90) * Math.PI / 180 let x1 = Math.ceil(Math.cos(angle) * cx) - let y1 = Math.ceil(Math.sin(angle) * cy) + const y1 = Math.ceil(Math.sin(angle) * cy) const moonWidth = x1 * 2 let x2 = Math.floor(moonWidth * this.illuminationRatio) diff --git a/desktop/src/shared/utils/ephemeris.ts b/desktop/src/shared/utils/ephemeris.ts index 6332d6bc8..b6b8b42e9 100644 --- a/desktop/src/shared/utils/ephemeris.ts +++ b/desktop/src/shared/utils/ephemeris.ts @@ -102,10 +102,10 @@ export function longitudeDegreesConstrained(deg: number) { } export function sphericalToRectangular(s: SphericalRepresentation): RectangularRepresentation { - let slon = Math.sin(s.lon) - let clon = Math.cos(s.lon) - let slat = Math.sin(s.lat) - let clat = Math.cos(s.lat) + const slon = Math.sin(s.lon) + const clon = Math.cos(s.lon) + const slat = Math.sin(s.lat) + const clat = Math.cos(s.lat) return { x: clon * clat,