Skip to content

Commit

Permalink
Merge branch 'main' into issue57
Browse files Browse the repository at this point in the history
  • Loading branch information
lstillwe committed Jun 11, 2024
2 parents efbc129 + 2e7ee1f commit 81e9a02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/components/model-selection/catalogItems.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function CatalogItems(data) {
// loop through the select layers in the group and add the default layer state
selectedLayers.forEach((layer) => {
// add the item to the list with the default state
newLayers.push({ ...layer, state: { visible: false }});
newLayers.push({ ...layer, state: { visible: false, opacity: 1.0 }});
});

// reset the visible layer states for all layers in the layer tray.
Expand All @@ -104,17 +104,17 @@ export default function CatalogItems(data) {
*
* @param layer
* @param group
* @returns {{ visible: boolean }}
* @returns {{ visible: boolean, opacity: 1.0 }}
*/
const newLayerDefaultState = (layer, group) => {
// if this is an obs layer and is the one just added
if (layer.group === group &&
(layer.properties['product_type'] === 'obs' || layer.properties['product_type'] === 'maxele63'))
// make this layer visible
return ({ visible: true });
return ({ visible: true, opacity: 1.0 });
else
// make this layer invisible
return ({ visible: false });
return ({ visible: false, opacity: 1.0 });
};

// do not render if there is no data
Expand Down Expand Up @@ -178,7 +178,7 @@ export default function CatalogItems(data) {
// filter by the group name
.filter((val, idx, self) =>
( idx === self.findIndex((t)=> ( t['group'] === val['group']) )))
.sort((a, b) => a['properties'][numberEle] > b['properties'][numberEle] ? 1 : -1)
.sort((a, b) => a['properties'][numberEle] < b['properties'][numberEle] ? 1 : -1)
// output summarized details of each group member
.map((mbr, mbrIdx) => (
// create the checkbox
Expand Down
4 changes: 2 additions & 2 deletions src/components/trays/layers/layer-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const LayerCard = ({ index, layer }) => {
borderLeftColor: isVisible
? `primary.plainColor`
: `primary.plainDisabledColor`,
'.action-button': { filter: 'opacity(0.1)', transition: 'filter 250ms' },
'.action-button': { filter: 'opacity(0.5)', transition: 'filter 250ms' },
'&:hover .action-button': { filter: 'opacity(0.5)' },
'& .action-button:hover': { filter: 'opacity(1.0)' },
}}
Expand Down Expand Up @@ -85,7 +85,7 @@ export const LayerCard = ({ index, layer }) => {
sx={{ flex: 1, pl: '50px' }}
>
<Typography level="body-sm" sx={{ display: 'inline-flex', alignItems: 'center' }}>
<ClockIcon sx={{ transform: 'scale(0.66)' }} /> { new Date(layer.properties.run_date).toLocaleString() }
<ClockIcon sx={{ transform: 'scale(0.66)' }} /> { layer.properties.run_date }
</Typography>
<Typography level="body-xs" sx={{ display: 'inline-flex', alignItems: 'center' }}>
Cycle { layer.properties.cycle }
Expand Down

0 comments on commit 81e9a02

Please sign in to comment.