diff --git a/public/css/materialize-local.css b/public/css/materialize-local.css index 731eb340..8ef010bb 100644 --- a/public/css/materialize-local.css +++ b/public/css/materialize-local.css @@ -68,9 +68,14 @@ textarea.materialize-textarea { line-height: 2rem !important; } +.row { + margin-bottom: 1rem; +} + .input-field { - margin-top: 0 !important; - margin-bottom: 0 !important; + margin-top: 1rem 0 0 0; + padding-left: 1rem; + padding-right: 1rem; } .input-field.col label { diff --git a/src/plugins/new-launch/new-launch.ts b/src/plugins/new-launch/new-launch.ts index 7a011949..615acf67 100644 --- a/src/plugins/new-launch/new-launch.ts +++ b/src/plugins/new-launch/new-launch.ts @@ -258,10 +258,16 @@ export class NewLaunch extends KeepTrackPlugin { }, validationFunc: (data: any) => typeof data.satPos !== 'undefined', error: () => { + if (!this.isDoingCalculations) { + // If we are not doing calculations, then it must have finished already. + return; + } + this.isDoingCalculations = false; hideLoading(); uiManagerInstance.toast('Cruncher failed to meet requirement after multiple tries! Is this launch even possible?', ToastMsgType.critical); }, + maxRetries: 50, }); }; diff --git a/src/plugins/screenshot/screenshot.ts b/src/plugins/screenshot/screenshot.ts index 0ede88db..30c2736c 100644 --- a/src/plugins/screenshot/screenshot.ts +++ b/src/plugins/screenshot/screenshot.ts @@ -27,6 +27,7 @@ import { KeepTrackApiEvents } from '@app/interfaces'; import { keepTrackApi } from '@app/keepTrackApi'; import { Classification } from '@app/static/classification'; import cameraPng from '@public/img/icons/camera.png'; +import logoPng from '@public/img/kts-text-logo.png'; import { KeepTrackPlugin } from '../KeepTrackPlugin'; export class Screenshot extends KeepTrackPlugin { @@ -36,6 +37,13 @@ export class Screenshot extends KeepTrackPlugin { this.saveHiResPhoto('4k'); }; + logo: HTMLImageElement; + constructor() { + super(); + this.logo = new Image(); + this.logo.src = logoPng; + } + // This is 'disabled' since it does not turn green after being clicked like other buttons. isIconDisabled = true; @@ -127,33 +135,28 @@ export class Screenshot extends KeepTrackPlugin { link.download = 'keeptrack.png'; - const d = new Date(); - const n = d.getUTCFullYear(); - const copyrightStr = !settingsManager.copyrightOveride ? `©${n} KEEPTRACK.SPACE` : ''; - - link.href = Screenshot.watermarkedDataUrl_(copyrightStr); + link.href = this.watermarkedDataUrl_(); link.click(); this.queuedScreenshot_ = false; } - private static watermarkedDataUrl_(text: string) { + private watermarkedDataUrl_() { const canvas = keepTrackApi.getRenderer().domElement; const tempCanvas = document.createElement('canvas'); const tempCtx = tempCanvas.getContext('2d'); const cw = tempCanvas.width; const ch = tempCanvas.height; + const logoWidth = 200; + const logoHeight = 200; + const logoX = canvas.width - logoWidth - 50; + const logoY = canvas.height - logoHeight - 50; tempCanvas.width = canvas.width; tempCanvas.height = canvas.height; tempCtx.drawImage(canvas, 0, 0); - tempCtx.font = '24px nasalization'; - let textWidth = tempCtx.measureText(text).width; - - tempCtx.globalAlpha = 1.0; - tempCtx.fillStyle = 'white'; - tempCtx.fillText(text, cw - textWidth - 30, ch - 30); + tempCtx.drawImage(this.logo, logoX, logoY, logoWidth, logoHeight); const { classificationstr, classificationColor } = Screenshot.calculateClassificationText_(); @@ -163,7 +166,8 @@ export class Screenshot extends KeepTrackPlugin { tempCtx.fillStyle = classificationColor; - textWidth = tempCtx.measureText(classificationstr).width; + const textWidth = tempCtx.measureText(classificationstr).width; + tempCtx.fillText(classificationstr, cw / 2 - textWidth, ch - 20); tempCtx.fillText(classificationstr, cw / 2 - textWidth, 34); } diff --git a/src/plugins/select-sat-manager/sat-info-box.ts b/src/plugins/select-sat-manager/sat-info-box.ts index 5de5cd6c..00b915b4 100644 --- a/src/plugins/select-sat-manager/sat-info-box.ts +++ b/src/plugins/select-sat-manager/sat-info-box.ts @@ -1087,6 +1087,8 @@ export class SatInfoBox extends KeepTrackPlugin { getEl(SatInfoBox.containerId_).style.maxHeight = '80%'; document.documentElement.style.setProperty('--search-box-bottom', '0px'); getEl(SatInfoBox.containerId_).classList.remove('satinfo-fixed'); + + getEl('search-results').style.maxHeight = '80%'; }); } @@ -1096,6 +1098,7 @@ export class SatInfoBox extends KeepTrackPlugin { satInfobox.addEventListener('mousedown', (e: any) => { if (e.button === 2) { SatInfoBox.resetMenuLocation(satInfobox); + getEl('search-results').style.maxHeight = ''; } }); } diff --git a/src/plugins/sensor/custom-sensor-plugin.ts b/src/plugins/sensor/custom-sensor-plugin.ts index c2a51c66..da2628a1 100644 --- a/src/plugins/sensor/custom-sensor-plugin.ts +++ b/src/plugins/sensor/custom-sensor-plugin.ts @@ -42,104 +42,79 @@ export class CustomSensorPlugin extends KeepTrackPlugin { sideMenuElementName: string = 'custom-sensor-menu'; sideMenuElementHtml: string = keepTrackApi.html` -