Skip to content

Commit

Permalink
wv-2702 orbit tracks (#4596)
Browse files Browse the repository at this point in the history
* Preliminary labels added

* Style changes to address orbit track label text

* remove logging
  • Loading branch information
Tomcariello authored Aug 25, 2023
1 parent da3eb61 commit 5630ed5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion web/js/components/layer/settings/associated-layers-toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function AssociatedLayersToggle(props) {
<h2 className="wv-header"> Associated Layers </h2>
{ associatedLayers.map((layer) => {
const { id } = layer;
const satelliteName = layer.title.split(' - ')[0];
const isEnabled = !!activeLayers[id];
const onCheck = () => (isEnabled ? removeLayer(id) : addLayer(id));
return (
Expand All @@ -41,7 +42,7 @@ function AssociatedLayersToggle(props) {
title="Enable/disable this layer"
checked={isEnabled}
onCheck={onCheck}
label={getTitle(layer)}
label={`${getTitle(layer)} (${satelliteName})`}
/>
);
}) }
Expand Down
3 changes: 2 additions & 1 deletion web/js/containers/sidebar/orbit-track.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function OrbitTrack(props) {

const containerClasses = `wv-orbit-track ${!trackLayer.visible ? 'not-visible' : ''}`;
const [palette, setPalette] = useState();
const satelliteName = trackLayer.title.split(' - ')[0];

useEffect(() => {
if (hasPalette && !isLoading && !renderedPalette) {
Expand All @@ -50,7 +51,7 @@ function OrbitTrack(props) {
{palette}
<FontAwesomeIcon icon="satellite" />
<span className="wv-orbit-track-label">
{getOrbitTrackTitle(trackLayer)}
{`${getOrbitTrackTitle(trackLayer)} (${satelliteName})`}
</span>
</div>
);
Expand Down
2 changes: 2 additions & 0 deletions web/scss/features/sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,8 @@ p.recharts-tooltip-label {

.layer-orbit-tracks .wv-checkbox {
margin: 10px 0 10px 10px;
display: flex;
align-items: center;

& label {
display: inline;
Expand Down

0 comments on commit 5630ed5

Please sign in to comment.