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

2807: Labels now have a 0.5 outline #2957

Merged
merged 17 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from 11 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
3 changes: 3 additions & 0 deletions public/javascripts/Gallery/css/cards.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/Gallery/src/modal/GalleryPanorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
};
Expand Down
11 changes: 11 additions & 0 deletions public/javascripts/SVLabel/src/SVLabel/label/Label.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,17 @@ function Label (svl, pathIn, params) {
// Renders the label image.
path.render2(ctx, pov);

//Draws label outline
misaugstad marked this conversation as resolved.
Show resolved Hide resolved
ctx.lineWidth = .7;
misaugstad marked this conversation as resolved.
Show resolved Hide resolved
ctx.beginPath();
ctx.arc(getCoordinate().x, getCoordinate().y, 15.3, 0, 2 * Math.PI);
ctx.strokeStyle = 'black';
ctx.stroke();
ctx.beginPath();
ctx.arc(getCoordinate().x, getCoordinate().y, 16.2, 0, 2 * Math.PI);
ctx.strokeStyle = 'white';
ctx.stroke();

// Only render severity warning if there's a severity option.
if (properties.labelType !== 'Occlusion' && properties.labelType !== 'Signal') {
if (properties.severity === null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function LabelVisibilityControl () {
htmlString = `<img src="assets/javascripts/SVValidate/img/HideLabel.svg" class="label-visibility-control-button-icon" alt="Hide Label">
<br /><u>H</u>ide Label</button>`;
labelVisibilityControlButton.html(htmlString);
let marker = document.getElementById('validate-pano-marker');
marker.classList.add('icon-outline');
}

/**
Expand All @@ -55,6 +57,8 @@ function LabelVisibilityControl () {
htmlString = `<img src="assets/javascripts/SVValidate/img/ShowLabel.svg" class="label-visibility-control-button-icon" alt="Hide Label">
<br />S<u>h</u>ow Label</button>`;
labelVisibilityControlButton.html(htmlString);
let marker = document.getElementById('validate-pano-marker');
marker.classList.remove('icon-outline');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion public/javascripts/SVValidate/src/panorama/Panorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down
1 change: 1 addition & 0 deletions public/javascripts/common/Panomarker.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@
}

var marker = document.createElement('div');
marker.classList.add('icon-outline');

// Basic style attributes for every marker
marker.style.position = 'absolute';
Expand Down
6 changes: 6 additions & 0 deletions public/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ footer {
* Custom styles
*/

.icon-outline {
border: 1px solid black;
border-radius: 25px;
outline: .5px solid white;
}

.stats-grid{
display: flex;
}
Expand Down