diff --git a/package-lock.json b/package-lock.json index 8c390df..34f02b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "datalab", "version": "0.1.0", "dependencies": { - "@geoman-io/leaflet-geoman-free": "^2.16.0", + "@geoman-io/leaflet-geoman-free": "^2.17.0", "@mdi/font": "5.9.55", "core-js": "^3.8.3", "d3": "^7.9.0", @@ -1934,16 +1934,17 @@ } }, "node_modules/@geoman-io/leaflet-geoman-free": { - "version": "2.16.0", - "resolved": "https://registry.npmjs.org/@geoman-io/leaflet-geoman-free/-/leaflet-geoman-free-2.16.0.tgz", - "integrity": "sha512-BnKAAoTXraWVFfhX/0gT/iBgAz1BPfpbdQ9dJamEFI4lIku9UNXXluu/E0k7YkZETq0tENX2GPnKLB4p+VgrSw==", + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/@geoman-io/leaflet-geoman-free/-/leaflet-geoman-free-2.17.0.tgz", + "integrity": "sha512-vAY9tKB2I/Ui8d3QUBuebWnunI2sGjsfAUTXMMcf5UpISvPz67io4hpbKXid9GNsW6P4LGv1+ZzrmkpM78GzHA==", + "license": "MIT", "dependencies": { "@turf/boolean-contains": "^6.5.0", "@turf/kinks": "^6.5.0", "@turf/line-intersect": "^6.5.0", "@turf/line-split": "^6.5.0", "lodash": "4.17.21", - "polygon-clipping": "0.15.3" + "polyclip-ts": "^0.16.5" }, "peerDependencies": { "leaflet": "^1.2.0" @@ -4045,6 +4046,15 @@ "node": "*" } }, + "node_modules/bignumber.js": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.1.2.tgz", + "integrity": "sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug==", + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -9782,12 +9792,14 @@ "node": ">=8" } }, - "node_modules/polygon-clipping": { - "version": "0.15.3", - "resolved": "https://registry.npmjs.org/polygon-clipping/-/polygon-clipping-0.15.3.tgz", - "integrity": "sha512-ho0Xx5DLkgxRx/+n4O74XyJ67DcyN3Tu9bGYKsnTukGAW6ssnuak6Mwcyb1wHy9MZc9xsUWqIoiazkZB5weECg==", + "node_modules/polyclip-ts": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/polyclip-ts/-/polyclip-ts-0.16.6.tgz", + "integrity": "sha512-/s1uKSup6qttXN4EaeRkE2SUkcwm72ZYMhHZH3MkJnBzgTGx1RHruawg15DBefwXqXA5f2Pz/HTXpRLHOjAEIw==", + "license": "MIT", "dependencies": { - "splaytree": "^3.1.0" + "bignumber.js": "^9.1.0", + "splaytree-ts": "^1.0.1" } }, "node_modules/portfinder": { @@ -11722,10 +11734,11 @@ "wbuf": "^1.7.3" } }, - "node_modules/splaytree": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/splaytree/-/splaytree-3.1.2.tgz", - "integrity": "sha512-4OM2BJgC5UzrhVnnJA4BkHKGtjXNzzUfpQjCO8I05xYPsfS/VuQDwjCGGMi8rYQilHEV4j8NBqTFbls/PZEE7A==" + "node_modules/splaytree-ts": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/splaytree-ts/-/splaytree-ts-1.0.1.tgz", + "integrity": "sha512-B+VzCm33/KEchi/fzT6/3NRHm8k5+Kf37SBQO3meHHS/tK2xBnIm4ZvusQ1wUpHgKMCCqEWgXnwFXAa1nD289g==", + "license": "BDS-3-Clause" }, "node_modules/sprintf-js": { "version": "1.0.3", diff --git a/package.json b/package.json index a3c6528..393e563 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "@geoman-io/leaflet-geoman-free": "^2.16.0", + "@geoman-io/leaflet-geoman-free": "^2.17.0", "@mdi/font": "5.9.55", "core-js": "^3.8.3", "d3": "^7.9.0", diff --git a/src/assets/images/delete.svg b/src/assets/images/delete.svg new file mode 100644 index 0000000..21c80c2 --- /dev/null +++ b/src/assets/images/delete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/resize.svg b/src/assets/images/resize.svg new file mode 100644 index 0000000..59d65b7 --- /dev/null +++ b/src/assets/images/resize.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/stock-vector-arrows-of-four-directions-linear-icon-black-symbol-on-transparent-background-1277674303.png b/src/assets/images/stock-vector-arrows-of-four-directions-linear-icon-black-symbol-on-transparent-background-1277674303.png deleted file mode 100644 index 09d4f2d..0000000 Binary files a/src/assets/images/stock-vector-arrows-of-four-directions-linear-icon-black-symbol-on-transparent-background-1277674303.png and /dev/null differ diff --git a/src/assets/images/vector-line.svg b/src/assets/images/vector-line.svg new file mode 100644 index 0000000..84168af --- /dev/null +++ b/src/assets/images/vector-line.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/images/vector-polyline-edit.svg b/src/assets/images/vector-polyline-edit.svg new file mode 100644 index 0000000..0a9161a --- /dev/null +++ b/src/assets/images/vector-polyline-edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/Project/ImageAnalysis/ImageAnalyzer.vue b/src/components/Project/ImageAnalysis/ImageAnalyzer.vue index a70c321..159c792 100644 --- a/src/components/Project/ImageAnalysis/ImageAnalyzer.vue +++ b/src/components/Project/ImageAnalysis/ImageAnalyzer.vue @@ -75,23 +75,22 @@ function handleAnalysisOutput(response, action, action_callback){ } function showHeaderDialog() { - if(headerData.value && Object.keys(headerData.value).length > 0) { headerDialog.value = true - return } - - const archiveHeadersUrl = configStore.datalabArchiveApiUrl + 'frames/' + props.image.id + '/headers/' - fetchApiCall({url: archiveHeadersUrl, method: 'GET', - successCallback: (response) => { - headerData.value = response.data - headerDialog.value = true - }, - failCallback: (error) => { - console.error('Failed to fetch headers:', error) - alertsStore.setAlert('error', `Could not fetch headers for frame ${props.image.id}`) - } - }) + else{ + const archiveHeadersUrl = configStore.datalabArchiveApiUrl + 'frames/' + props.image.id + '/headers/' + fetchApiCall({url: archiveHeadersUrl, method: 'GET', + successCallback: (response) => { + headerData.value = response.data + headerDialog.value = true + }, + failCallback: (error) => { + console.error('Failed to fetch headers:', error) + alertsStore.setAlert('error', `Could not fetch headers for frame ${props.image.id}`) + } + }) + } } @@ -134,20 +133,25 @@ function showHeaderDialog() {

{{ siteIDToName(image.site_id) ?? 'Missing Site' }}

{{ image.telescope_id ?? 'Missing Telescope ID' }}

{{ image.instrument_id ?? 'Missing Instrument ID' }}

{{ new Date(image.observation_date).toLocaleString() }}

- + + + @@ -181,84 +185,50 @@ a{ color: var(--tan); } .v-sheet{ - background-color: var(--metal); - color: var(--tan); -} -.v-table{ - background-color: var(--metal); + background-color: var(--dark-blue); color: var(--tan); - max-width: 60ch; -} -.table_key{ - font-weight: bold; - font-size: large; + font-family: 'Open Sans', sans-serif; } .analysis-sheet{ - background-color: var(--dark-blue); - font-family: 'Open Sans', sans-serif; - text-transform: uppercase; + max-height: 100vh; + display: flex; + flex-direction: column; } .analysis-toolbar{ color: var(--tan); background-color: var(--metal); } .analysis-content{ + flex: 1; display: flex; - width: 100%; - height: 100%; + flex-direction: row; + padding: 1rem; } .side-panel-container { - margin-top: 2%; display: flex; - flex-direction: column + flex-direction: column; + margin-left: 10px; + width: 45vw; } -.side-panel{ +.basic-info-sheet{ padding: 1rem; color: var(--tan); - margin-left: 10px; - margin-bottom: 5%; -} -@media (min-width: 1201px) { - .side-panel-container { - margin-left: 20%; - } -} -@media (max-width: 1200px) { -.analysis-sheet { - overflow: hidden !important; -} -.side-panel { - font-size: 0.75em; -} -} -@media (max-width: 900px) { -.analysis-sheet { - display: flex; - flex-direction: column; - overflow: hidden !important; -} -.analysis-content { - flex-direction: column; -} -.side-panel-container { - margin-left: 11%; - margin-top: 5%; - flex-direction: row; - height: 30%; -} -.side-panel { - width: 25%; - height: 50%; - margin: 0; + background-color: var(--metal); } -.line-plot { - flex-grow: 1; +.line-plot-sheet { + margin-top: 1rem; + padding: 1rem; + background-color: var(--metal); height: 100%; } -.image-viewer { - order: -1; - height: 70%; +/* FITS Header Info Table */ +.v-table{ + background-color: var(--dark-blue); + color: var(--tan); + max-width: 60ch; } +.table_key{ + font-weight: bold; + font-size: large; } - diff --git a/src/components/Project/ImageAnalysis/ImageViewer.vue b/src/components/Project/ImageAnalysis/ImageViewer.vue index 8d5b440..4505dde 100644 --- a/src/components/Project/ImageAnalysis/ImageViewer.vue +++ b/src/components/Project/ImageAnalysis/ImageViewer.vue @@ -1,9 +1,10 @@ - - +
- + diff --git a/src/components/Project/ImageAnalysis/LinePlot.vue b/src/components/Project/ImageAnalysis/LinePlot.vue index 8d1359b..378dfb1 100644 --- a/src/components/Project/ImageAnalysis/LinePlot.vue +++ b/src/components/Project/ImageAnalysis/LinePlot.vue @@ -7,9 +7,9 @@ const svg = ref(null) const props = defineProps(['yAxisLuminosity', 'xAxisArcsecs', 'startCoords', 'endCoords', 'positionAngle']) // Setting dimensions and margins for the plot -const margin = { top: 20, right: 20, bottom: 70, left: 80 }, - svgWidth = 700, - svgHeight = 480, +const margin = { top: 0, right: 40, bottom: 50, left: 60 }, + svgWidth = 500, + svgHeight = 350, width = svgWidth - margin.left - margin.right, height = svgHeight - margin.top - margin.bottom @@ -29,7 +29,7 @@ const line = d3.line() const updateAxes = () => { const maxX = props.xAxisArcsecs - // Add 5% to the largest number from the randomNumbers array to buffer the plot + // Add 5% to the largest number to buffer the plot const maxY = d3.max(props.yAxisLuminosity) * 1.05 x.domain([0, maxX]) @@ -137,23 +137,4 @@ onMounted(() => { color: var(--tan); font-family: 'Open Sans', sans-serif; } -@media (max-width: 1200px) { -.svg-wrapper { - margin-left: -18%; -} -.line-plot { - background-color: var(--dark-blue); - transform: scale(0.7); -} -} -@media (max-width: 900px) { -.svg-wrapper { - margin-top: -7%; - padding-left: 15%; -} -.line-plot { - background-color: var(--dark-blue); - transform: scale(0.8); -} -}