From 83ce984976fa01080a97d6bf559aea79e36ba6b4 Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Tue, 5 Jul 2022 10:08:06 -0700 Subject: [PATCH 01/12] Label icons now have a .5 outline --- public/javascripts/SVLabel/src/SVLabel/label/Label.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/javascripts/SVLabel/src/SVLabel/label/Label.js b/public/javascripts/SVLabel/src/SVLabel/label/Label.js index a2221c9d07..1dbb4605ae 100644 --- a/public/javascripts/SVLabel/src/SVLabel/label/Label.js +++ b/public/javascripts/SVLabel/src/SVLabel/label/Label.js @@ -423,6 +423,17 @@ function Label (svl, pathIn, params) { // Renders the label image. path.render2(ctx, pov); + // Draws an outline around the label icon. + ctx.lineWidth = .5; + ctx.beginPath(); + ctx.arc(getCoordinate().x, getCoordinate().y, 15.3, 0, 2 * Math.PI); + ctx.strokeStyle = 'white'; + ctx.stroke(); + ctx.beginPath(); + ctx.arc(getCoordinate().x, getCoordinate().y, 16.2, 0, 2 * Math.PI); + ctx.strokeStyle = 'black'; + ctx.stroke(); + // Only render severity warning if there's a severity option. if (properties.labelType !== 'Occlusion' && properties.labelType !== 'Signal') { if (properties.severity === undefined) { From b96147143a55b2ddb64de4a467f95572c174b480 Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Fri, 8 Jul 2022 10:06:59 -0700 Subject: [PATCH 02/12] Final 0.5 label icon outline From 71b26cc2ff683f4a6f127a62175359184c1f4d04 Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Wed, 13 Jul 2022 11:51:41 -0700 Subject: [PATCH 03/12] Final label icon outlines --- public/javascripts/Gallery/css/cards.css | 3 +++ public/javascripts/SVLabel/src/SVLabel/label/Label.js | 6 +++--- public/javascripts/common/Panomarker.js | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/public/javascripts/Gallery/css/cards.css b/public/javascripts/Gallery/css/cards.css index 4f24712ab6..4706dd27e3 100644 --- a/public/javascripts/Gallery/css/cards.css +++ b/public/javascripts/Gallery/css/cards.css @@ -156,6 +156,9 @@ with respect to the image holder. This allows the validation menu to be placed o position: absolute; width: 1.1vw; z-index: 1; + border: 1px solid black; + border-radius: 100%; + outline: 0.5px solid white; } .validation-button, .validation-button-selected { diff --git a/public/javascripts/SVLabel/src/SVLabel/label/Label.js b/public/javascripts/SVLabel/src/SVLabel/label/Label.js index 1dbb4605ae..6aced1cebe 100644 --- a/public/javascripts/SVLabel/src/SVLabel/label/Label.js +++ b/public/javascripts/SVLabel/src/SVLabel/label/Label.js @@ -424,14 +424,14 @@ function Label (svl, pathIn, params) { path.render2(ctx, pov); // Draws an outline around the label icon. - ctx.lineWidth = .5; + ctx.lineWidth = .7; ctx.beginPath(); ctx.arc(getCoordinate().x, getCoordinate().y, 15.3, 0, 2 * Math.PI); - ctx.strokeStyle = 'white'; + ctx.strokeStyle = 'black'; ctx.stroke(); ctx.beginPath(); ctx.arc(getCoordinate().x, getCoordinate().y, 16.2, 0, 2 * Math.PI); - ctx.strokeStyle = 'black'; + ctx.strokeStyle = 'white'; ctx.stroke(); // Only render severity warning if there's a severity option. diff --git a/public/javascripts/common/Panomarker.js b/public/javascripts/common/Panomarker.js index 127acd2304..a7d69f722e 100644 --- a/public/javascripts/common/Panomarker.js +++ b/public/javascripts/common/Panomarker.js @@ -408,6 +408,11 @@ marker.style.height = this.size_.height + 'px'; marker.style.display = this.visible_ ? 'block' : 'none'; marker.style.zIndex = this.zIndex_; + marker.style.border = 'solid black'; + marker.style.borderWidth = '1px'; + marker.style.borderRadius = '25px'; + marker.style.outline = 'solid white'; + marker.style.outlineWidth = '0.5px'; // Set other css attributes based on the given parameters if (this.id_) { marker.id = this.id_; } From 528f27bd13d92396473f2932ce4d010f333c63a7 Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Thu, 14 Jul 2022 13:18:22 -0700 Subject: [PATCH 04/12] Outline disappears when label is hidden, label size adjustment --- public/javascripts/Gallery/src/modal/GalleryPanorama.js | 2 +- .../SVValidate/src/label/LabelVisibilityControl.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/public/javascripts/Gallery/src/modal/GalleryPanorama.js b/public/javascripts/Gallery/src/modal/GalleryPanorama.js index 64769ad941..8e78bdb05e 100644 --- a/public/javascripts/Gallery/src/modal/GalleryPanorama.js +++ b/public/javascripts/Gallery/src/modal/GalleryPanorama.js @@ -176,7 +176,7 @@ pano: self.panorama, position: {heading: pos.heading, pitch: pos.pitch}, icon: url, - size: new google.maps.Size(20, 20), + size: new google.maps.Size(22, 22), anchor: new google.maps.Point(10, 10) }) }; diff --git a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js index eeee701d08..b58e9c5b04 100644 --- a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js +++ b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js @@ -31,6 +31,11 @@ function LabelVisibilityControl () { */ function unhideLabel () { let panomarker = svv.panorama.getPanomarker(); + panomarker.marker_.style.border = 'solid black'; + panomarker.marker_.style.borderWidth = '1px'; + panomarker.marker_.style.borderRadius = '25px'; + panomarker.marker_.style.outline = 'solid white'; + panomarker.marker_.style.outlineWidth = '0.5px'; let label = svv.panorama.getCurrentLabel(); panomarker.setIcon(label.getIconUrl()); panomarker.draw(); @@ -47,6 +52,8 @@ function LabelVisibilityControl () { */ function hideLabel () { let panomarker = svv.panorama.getPanomarker(); + panomarker.marker_.style.border = 'none'; + panomarker.marker_.style.outline = 'none'; panomarker.setIcon("assets/javascripts/SVLabel/img/icons/Label_Outline.svg"); panomarker.draw(); visible = false; From 8253f94c7f2990a87baa420ee68d75361f5238ed Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Mon, 18 Jul 2022 11:34:02 -0700 Subject: [PATCH 05/12] Working on referencing CSS classes --- .../SVValidate/src/label/LabelVisibilityControl.js | 6 ++++-- public/javascripts/common/Panomarker.js | 6 +----- public/stylesheets/main.css | 6 ++++++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js index b58e9c5b04..3897458410 100644 --- a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js +++ b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js @@ -31,11 +31,12 @@ function LabelVisibilityControl () { */ function unhideLabel () { let panomarker = svv.panorama.getPanomarker(); - panomarker.marker_.style.border = 'solid black'; + //reference icon-outline + /*panomarker.marker_.style.border = 'solid black'; panomarker.marker_.style.borderWidth = '1px'; panomarker.marker_.style.borderRadius = '25px'; panomarker.marker_.style.outline = 'solid white'; - panomarker.marker_.style.outlineWidth = '0.5px'; + panomarker.marker_.style.outlineWidth = '0.5px';*/ let label = svv.panorama.getCurrentLabel(); panomarker.setIcon(label.getIconUrl()); panomarker.draw(); @@ -52,6 +53,7 @@ function LabelVisibilityControl () { */ function hideLabel () { let panomarker = svv.panorama.getPanomarker(); + //?? panomarker.marker_.style.border = 'none'; panomarker.marker_.style.outline = 'none'; panomarker.setIcon("assets/javascripts/SVLabel/img/icons/Label_Outline.svg"); diff --git a/public/javascripts/common/Panomarker.js b/public/javascripts/common/Panomarker.js index a7d69f722e..3003661672 100644 --- a/public/javascripts/common/Panomarker.js +++ b/public/javascripts/common/Panomarker.js @@ -400,6 +400,7 @@ } var marker = document.createElement('div'); + marker.className = 'icon-outline'; // Basic style attributes for every marker marker.style.position = 'absolute'; @@ -408,11 +409,6 @@ marker.style.height = this.size_.height + 'px'; marker.style.display = this.visible_ ? 'block' : 'none'; marker.style.zIndex = this.zIndex_; - marker.style.border = 'solid black'; - marker.style.borderWidth = '1px'; - marker.style.borderRadius = '25px'; - marker.style.outline = 'solid white'; - marker.style.outlineWidth = '0.5px'; // Set other css attributes based on the given parameters if (this.id_) { marker.id = this.id_; } diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 63fcd8a469..e610796824 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -71,6 +71,12 @@ footer { * Custom styles */ +.icon-outline { + border: 1px solid black; + border-radius: 25px; + outline: .5px solid white; +} + .stats-grid{ display: flex; } From ed04a8c501ac72a6fbdf45dc13e89fb8c7709b8a Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Thu, 21 Jul 2022 13:25:42 -0700 Subject: [PATCH 06/12] Outlines working in Gallery and Validate, working on Explore --- .../javascripts/SVLabel/src/SVLabel/label/Label.js | 5 +++-- .../SVValidate/src/label/LabelVisibilityControl.js | 13 ++++--------- public/javascripts/common/Panomarker.js | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/public/javascripts/SVLabel/src/SVLabel/label/Label.js b/public/javascripts/SVLabel/src/SVLabel/label/Label.js index 6aced1cebe..2b4d182763 100644 --- a/public/javascripts/SVLabel/src/SVLabel/label/Label.js +++ b/public/javascripts/SVLabel/src/SVLabel/label/Label.js @@ -424,7 +424,8 @@ function Label (svl, pathIn, params) { path.render2(ctx, pov); // Draws an outline around the label icon. - ctx.lineWidth = .7; + //reference icon-outline + /*ctx.lineWidth = .7; ctx.beginPath(); ctx.arc(getCoordinate().x, getCoordinate().y, 15.3, 0, 2 * Math.PI); ctx.strokeStyle = 'black'; @@ -432,7 +433,7 @@ function Label (svl, pathIn, params) { ctx.beginPath(); ctx.arc(getCoordinate().x, getCoordinate().y, 16.2, 0, 2 * Math.PI); ctx.strokeStyle = 'white'; - ctx.stroke(); + ctx.stroke();*/ // Only render severity warning if there's a severity option. if (properties.labelType !== 'Occlusion' && properties.labelType !== 'Signal') { diff --git a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js index 3897458410..187f71f17c 100644 --- a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js +++ b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js @@ -31,13 +31,9 @@ function LabelVisibilityControl () { */ function unhideLabel () { let panomarker = svv.panorama.getPanomarker(); - //reference icon-outline - /*panomarker.marker_.style.border = 'solid black'; - panomarker.marker_.style.borderWidth = '1px'; - panomarker.marker_.style.borderRadius = '25px'; - panomarker.marker_.style.outline = 'solid white'; - panomarker.marker_.style.outlineWidth = '0.5px';*/ let label = svv.panorama.getCurrentLabel(); + var marker = document.getElementById('validate-pano-marker'); + marker.classList.add('icon-outline'); panomarker.setIcon(label.getIconUrl()); panomarker.draw(); visible = true; @@ -53,9 +49,8 @@ function LabelVisibilityControl () { */ function hideLabel () { let panomarker = svv.panorama.getPanomarker(); - //?? - panomarker.marker_.style.border = 'none'; - panomarker.marker_.style.outline = 'none'; + var marker = document.getElementById('validate-pano-marker'); + marker.classList.remove('icon-outline'); panomarker.setIcon("assets/javascripts/SVLabel/img/icons/Label_Outline.svg"); panomarker.draw(); visible = false; diff --git a/public/javascripts/common/Panomarker.js b/public/javascripts/common/Panomarker.js index 3003661672..f6f17eff20 100644 --- a/public/javascripts/common/Panomarker.js +++ b/public/javascripts/common/Panomarker.js @@ -400,7 +400,7 @@ } var marker = document.createElement('div'); - marker.className = 'icon-outline'; + marker.classList.add('icon-outline'); // Basic style attributes for every marker marker.style.position = 'absolute'; From 5fa9859e9fe310bdf6f9b938e1d4874b536137f5 Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Tue, 26 Jul 2022 11:47:09 -0700 Subject: [PATCH 07/12] Outlines now use CSS class --- public/javascripts/SVLabel/src/SVLabel/label/Label.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/javascripts/SVLabel/src/SVLabel/label/Label.js b/public/javascripts/SVLabel/src/SVLabel/label/Label.js index 2b4d182763..b85f61655a 100644 --- a/public/javascripts/SVLabel/src/SVLabel/label/Label.js +++ b/public/javascripts/SVLabel/src/SVLabel/label/Label.js @@ -423,9 +423,7 @@ function Label (svl, pathIn, params) { // Renders the label image. path.render2(ctx, pov); - // Draws an outline around the label icon. - //reference icon-outline - /*ctx.lineWidth = .7; + ctx.lineWidth = .7; ctx.beginPath(); ctx.arc(getCoordinate().x, getCoordinate().y, 15.3, 0, 2 * Math.PI); ctx.strokeStyle = 'black'; @@ -433,7 +431,7 @@ function Label (svl, pathIn, params) { ctx.beginPath(); ctx.arc(getCoordinate().x, getCoordinate().y, 16.2, 0, 2 * Math.PI); ctx.strokeStyle = 'white'; - ctx.stroke();*/ + ctx.stroke(); // Only render severity warning if there's a severity option. if (properties.labelType !== 'Occlusion' && properties.labelType !== 'Signal') { From 1d1b0cfb0fec21b0b49160f761ed6972ba1e0aad Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Wed, 3 Aug 2022 10:37:00 -0700 Subject: [PATCH 08/12] Fixed hide/show label button issue and centered obstacle label --- public/javascripts/SVLabel/src/SVLabel/label/Label.js | 1 + .../SVValidate/src/label/LabelVisibilityControl.js | 8 ++++---- public/javascripts/SVValidate/src/panorama/Panorama.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/javascripts/SVLabel/src/SVLabel/label/Label.js b/public/javascripts/SVLabel/src/SVLabel/label/Label.js index b85f61655a..33e7cc6fa5 100644 --- a/public/javascripts/SVLabel/src/SVLabel/label/Label.js +++ b/public/javascripts/SVLabel/src/SVLabel/label/Label.js @@ -423,6 +423,7 @@ function Label (svl, pathIn, params) { // Renders the label image. path.render2(ctx, pov); + //Draws label outline ctx.lineWidth = .7; ctx.beginPath(); ctx.arc(getCoordinate().x, getCoordinate().y, 15.3, 0, 2 * Math.PI); diff --git a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js index 187f71f17c..66f2ad4e7b 100644 --- a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js +++ b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js @@ -32,8 +32,6 @@ function LabelVisibilityControl () { function unhideLabel () { let panomarker = svv.panorama.getPanomarker(); let label = svv.panorama.getCurrentLabel(); - var marker = document.getElementById('validate-pano-marker'); - marker.classList.add('icon-outline'); panomarker.setIcon(label.getIconUrl()); panomarker.draw(); visible = true; @@ -42,6 +40,8 @@ function LabelVisibilityControl () { htmlString = `Hide Label
Hide Label`; labelVisibilityControlButton.html(htmlString); + let marker = document.getElementById('validate-pano-marker'); + marker.classList.add('icon-outline'); } /** @@ -49,8 +49,6 @@ function LabelVisibilityControl () { */ function hideLabel () { let panomarker = svv.panorama.getPanomarker(); - var marker = document.getElementById('validate-pano-marker'); - marker.classList.remove('icon-outline'); panomarker.setIcon("assets/javascripts/SVLabel/img/icons/Label_Outline.svg"); panomarker.draw(); visible = false; @@ -59,6 +57,8 @@ function LabelVisibilityControl () { htmlString = `Hide Label
Show Label`; labelVisibilityControlButton.html(htmlString); + let marker = document.getElementById('validate-pano-marker'); + marker.classList.remove('icon-outline'); } /** diff --git a/public/javascripts/SVValidate/src/panorama/Panorama.js b/public/javascripts/SVValidate/src/panorama/Panorama.js index 4326ed0160..a4c95fe1f3 100644 --- a/public/javascripts/SVValidate/src/panorama/Panorama.js +++ b/public/javascripts/SVValidate/src/panorama/Panorama.js @@ -238,7 +238,7 @@ function Panorama (label) { pano: panorama, position: {heading: pos.heading, pitch: pos.pitch}, icon: url, - size: new google.maps.Size(currentLabel.getRadius() * 2, currentLabel.getRadius() * 2), + size: new google.maps.Size(currentLabel.getRadius() * 2 + 2, currentLabel.getRadius() * 2 + 2), anchor: new google.maps.Point(currentLabel.getRadius(), currentLabel.getRadius()), zIndex: 2 }); From 13ea256b29e2923dda5131a2acb906ae28e9a937 Mon Sep 17 00:00:00 2001 From: bnelson05 Date: Wed, 10 Aug 2022 14:12:35 -0700 Subject: [PATCH 09/12] Fixed Uncaught TypeError bug --- .../javascripts/SVLabel/src/SVLabel/label/Label.js | 2 +- .../SVValidate/src/label/LabelVisibilityControl.js | 12 ++++++------ .../SVValidate/src/panorama/PanoramaContainer.js | 2 +- public/javascripts/common/Panomarker.js | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/javascripts/SVLabel/src/SVLabel/label/Label.js b/public/javascripts/SVLabel/src/SVLabel/label/Label.js index 0acd314262..a68d6c7330 100644 --- a/public/javascripts/SVLabel/src/SVLabel/label/Label.js +++ b/public/javascripts/SVLabel/src/SVLabel/label/Label.js @@ -423,7 +423,7 @@ function Label (svl, pathIn, params) { // Renders the label image. path.render2(ctx, pov); - //Draws label outline + // Draws label outline. ctx.lineWidth = .7; ctx.beginPath(); ctx.arc(getCoordinate().x, getCoordinate().y, 15.3, 0, 2 * Math.PI); diff --git a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js index 66f2ad4e7b..55830446ea 100644 --- a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js +++ b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js @@ -21,7 +21,7 @@ function LabelVisibilityControl () { hideLabel(); } else { svv.tracker.push("Click_UnhideLabel"); - unhideLabel(); + unhideLabel(false); } } @@ -29,7 +29,7 @@ function LabelVisibilityControl () { * Unhides label in Google StreetView Panorama * depending on current state. */ - function unhideLabel () { + function unhideLabel (newLabel) { let panomarker = svv.panorama.getPanomarker(); let label = svv.panorama.getCurrentLabel(); panomarker.setIcon(label.getIconUrl()); @@ -40,8 +40,9 @@ function LabelVisibilityControl () { htmlString = `Hide Label
Hide Label`; labelVisibilityControlButton.html(htmlString); - let marker = document.getElementById('validate-pano-marker'); - marker.classList.add('icon-outline'); + if (!newLabel) { + panomarker.marker_.classList.add('icon-outline'); + } } /** @@ -57,8 +58,7 @@ function LabelVisibilityControl () { htmlString = `Hide Label
Show Label`; labelVisibilityControlButton.html(htmlString); - let marker = document.getElementById('validate-pano-marker'); - marker.classList.remove('icon-outline'); + panomarker.marker_.classList.remove('icon-outline'); } /** diff --git a/public/javascripts/SVValidate/src/panorama/PanoramaContainer.js b/public/javascripts/SVValidate/src/panorama/PanoramaContainer.js index dc8850939b..78c3923435 100644 --- a/public/javascripts/SVValidate/src/panorama/PanoramaContainer.js +++ b/public/javascripts/SVValidate/src/panorama/PanoramaContainer.js @@ -99,7 +99,7 @@ function PanoramaContainer (labelList) { svv.panorama.setLabel(labels[getProperty('progress')]); setProperty('progress', getProperty('progress') + 1); if (svv.labelVisibilityControl && !svv.labelVisibilityControl.isVisible()) { - svv.labelVisibilityControl.unhideLabel(); + svv.labelVisibilityControl.unhideLabel(true); } // Update zoom availability on desktop. diff --git a/public/javascripts/common/Panomarker.js b/public/javascripts/common/Panomarker.js index f6f17eff20..175a1fd864 100644 --- a/public/javascripts/common/Panomarker.js +++ b/public/javascripts/common/Panomarker.js @@ -398,7 +398,7 @@ // has already been created. return; } - + var marker = document.createElement('div'); marker.classList.add('icon-outline'); From 7a40647025ea4b9a8c64ff77a7e8eaa5c1930bb3 Mon Sep 17 00:00:00 2001 From: Mikey Saugstad Date: Mon, 22 Aug 2022 13:43:26 -0700 Subject: [PATCH 10/12] comment and whitespace updates --- .../javascripts/SVValidate/src/label/LabelVisibilityControl.js | 2 ++ public/javascripts/common/Panomarker.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js index 55830446ea..668de2d580 100644 --- a/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js +++ b/public/javascripts/SVValidate/src/label/LabelVisibilityControl.js @@ -28,6 +28,7 @@ function LabelVisibilityControl () { /** * Unhides label in Google StreetView Panorama * depending on current state. + * @param {boolean} newLabel Indicates whether we unhide due to showing a new label vs. clicking the unhide button. */ function unhideLabel (newLabel) { let panomarker = svv.panorama.getPanomarker(); @@ -40,6 +41,7 @@ function LabelVisibilityControl () { htmlString = `Hide Label
Hide Label`; labelVisibilityControlButton.html(htmlString); + // If we are unhiding because the user is moving on to their next label, then Panomarker.js adds the outline. if (!newLabel) { panomarker.marker_.classList.add('icon-outline'); } diff --git a/public/javascripts/common/Panomarker.js b/public/javascripts/common/Panomarker.js index 175a1fd864..f6f17eff20 100644 --- a/public/javascripts/common/Panomarker.js +++ b/public/javascripts/common/Panomarker.js @@ -398,7 +398,7 @@ // has already been created. return; } - + var marker = document.createElement('div'); marker.classList.add('icon-outline'); From fbb4cdcbfa84a667c78e0c8f8f9d934188d040b7 Mon Sep 17 00:00:00 2001 From: Mikey Saugstad Date: Mon, 22 Aug 2022 14:03:42 -0700 Subject: [PATCH 11/12] adds outline to label icons on user dashboard --- public/javascripts/Gallery/css/cards.css | 6 +----- public/javascripts/Gallery/src/cards/Card.js | 2 +- public/javascripts/Progress/src/MistakeCarousel.js | 2 +- public/stylesheets/main.css | 7 +++++++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/public/javascripts/Gallery/css/cards.css b/public/javascripts/Gallery/css/cards.css index 4efff3ee79..ec31e18917 100644 --- a/public/javascripts/Gallery/css/cards.css +++ b/public/javascripts/Gallery/css/cards.css @@ -156,13 +156,9 @@ with respect to the image holder. This allows the validation menu to be placed o color: black; } -.label-icon { - position: absolute; +.label-icon-gallery { width: 1.1vw; z-index: 1; - border: 1px solid black; - border-radius: 100%; - outline: 0.5px solid white; } .validation-button, .validation-button-selected { diff --git a/public/javascripts/Gallery/src/cards/Card.js b/public/javascripts/Gallery/src/cards/Card.js index 5e39a6fdb1..e3eb5ae9cb 100644 --- a/public/javascripts/Gallery/src/cards/Card.js +++ b/public/javascripts/Gallery/src/cards/Card.js @@ -84,7 +84,7 @@ function Card (params, imageUrl, modal) { // Place label icon. labelIcon.src = iconImagePaths[getLabelType()]; - labelIcon.className = "label-icon"; + labelIcon.classList.add("label-icon", "label-icon-gallery"); let iconCoords = getIconPercent(); labelIcon.style.left = iconCoords.x + "px"; labelIcon.style.top = iconCoords.y + "px"; diff --git a/public/javascripts/Progress/src/MistakeCarousel.js b/public/javascripts/Progress/src/MistakeCarousel.js index bab3be1c4d..27eb7b9009 100644 --- a/public/javascripts/Progress/src/MistakeCarousel.js +++ b/public/javascripts/Progress/src/MistakeCarousel.js @@ -75,8 +75,8 @@ function MistakeCarousel() { // Add the label icon onto the GSV image. let labelIcon = document.createElement('img'); labelIcon.src = `/assets/images/icons/AdminTool_${labelType}.png`; + labelIcon.classList.add('label-icon'); Object.assign(labelIcon.style, { - position: 'absolute', left: `${100 * label.canvas_x / label.canvas_width}%`, top: `${100 * label.canvas_y / label.canvas_height}%` }); diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index 234a378c84..d13d0aa5f4 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -1284,6 +1284,13 @@ kbd { border-bottom-width: 0; } +.label-icon { + position: absolute; + border: 1px solid black; + border-radius: 100%; + outline: 0.5px solid white; +} + .gif-container { position: relative; text-align: left; From 84dd15d5796e3386ff1f78bd6be285c340769304 Mon Sep 17 00:00:00 2001 From: Mikey Saugstad Date: Mon, 22 Aug 2022 14:08:11 -0700 Subject: [PATCH 12/12] moves some CSS --- public/stylesheets/main.css | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index d13d0aa5f4..cdcfe17c93 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -70,6 +70,12 @@ footer { /* * Custom styles */ +.label-icon { + position: absolute; + border: 1px solid black; + border-radius: 100%; + outline: 0.5px solid white; +} .icon-outline { border: 1px solid black; @@ -1284,13 +1290,6 @@ kbd { border-bottom-width: 0; } -.label-icon { - position: absolute; - border: 1px solid black; - border-radius: 100%; - outline: 0.5px solid white; -} - .gif-container { position: relative; text-align: left;