From 6132504ce06947d56500a2e66c1e827f0ef8b7a9 Mon Sep 17 00:00:00 2001 From: Lloyd Dakin Date: Mon, 9 Dec 2024 15:25:43 -0800 Subject: [PATCH 1/5] comment changes, one-lined layer control creation --- src/components/Project/ImageAnalysis/ImageViewer.vue | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/Project/ImageAnalysis/ImageViewer.vue b/src/components/Project/ImageAnalysis/ImageViewer.vue index d64493d..b46fee5 100644 --- a/src/components/Project/ImageAnalysis/ImageViewer.vue +++ b/src/components/Project/ImageAnalysis/ImageViewer.vue @@ -26,7 +26,6 @@ let imageBounds let initialCenter = [0, 0] let initialZoom = 1 let lineLayer = null -let layerControl = null const imageWidth = ref(0) const imageHeight = ref(0) const isLoading = ref(true) @@ -101,7 +100,7 @@ function leafletSetup(){ toggle: false, }) - // Disabling default controls + // Geoman settings setup imageMap.pm.addControls({ position: 'topleft', drawMarker: false, @@ -117,6 +116,7 @@ function leafletSetup(){ removalMode: true }) + // Logic to only allow the user to draw one line with two points imageMap.on('pm:drawstart', ({ workingLayer }) => { // Remove last drawn line when starting new one if (lineLayer && imageMap.hasLayer(lineLayer)) { @@ -130,7 +130,7 @@ function leafletSetup(){ }) }) - // Get coordinates of the line + // Requests a Line Profile when a line is drawn/edited imageMap.on('pm:create', (e) => { // Save last drawn line lineLayer = e.layer @@ -214,9 +214,7 @@ function createCatalogLayer(){ catalogLayerGroup.addTo(imageMap) // Layer control allows the toggling of layers on the map - layerControl = L.control.layers(null, null, {collapsed:false}).addTo(imageMap) - - layerControl.addOverlay(catalogLayerGroup, 'Source Catalog') + L.control.layers(null, { 'Source Catalog': catalogLayerGroup }, { collapsed: false }).addTo(imageMap) } function fetchCatalog(){ From 4ec04168751e7768ac34edc2d0bcea4bc2570e17 Mon Sep 17 00:00:00 2001 From: Lloyd Dakin Date: Wed, 11 Dec 2024 15:11:25 -0800 Subject: [PATCH 2/5] nonlinearslider.vue, added slider to analyzer, imageviewer clears control group --- src/components/Global/NonLinearSlider.vue | 89 +++++++++++++++++++ .../Global/Scaling/HistogramSlider.vue | 27 +++--- .../Project/ImageAnalysis/ImageAnalyzer.vue | 34 ++++--- .../Project/ImageAnalysis/ImageViewer.vue | 52 +++++------ 4 files changed, 147 insertions(+), 55 deletions(-) create mode 100644 src/components/Global/NonLinearSlider.vue diff --git a/src/components/Global/NonLinearSlider.vue b/src/components/Global/NonLinearSlider.vue new file mode 100644 index 0000000..1fb00a4 --- /dev/null +++ b/src/components/Global/NonLinearSlider.vue @@ -0,0 +1,89 @@ + + + diff --git a/src/components/Global/Scaling/HistogramSlider.vue b/src/components/Global/Scaling/HistogramSlider.vue index 41d2323..4b1fb31 100644 --- a/src/components/Global/Scaling/HistogramSlider.vue +++ b/src/components/Global/Scaling/HistogramSlider.vue @@ -152,8 +152,8 @@ watch( variant="outlined" step="10" hide-details - @update:modelValue="updateLowerScale"> - + @update:model-value="updateLowerScale" + /> - + @update:model-value="updateUpperScale" + /> Z-Scale + > + Z-Scale + - + /> -