Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from CodeFactor #232

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions desktop/src/app/image/image.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion desktop/src/shared/components/moon/moon.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions desktop/src/shared/utils/ephemeris.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading