Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shashankbrgowda committed Nov 18, 2024
1 parent 374ebad commit c22d981
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export function layoutsModelFactory(
if (
refName !== assembly?.getCanonicalRefName(feature.refSeq) ||
!doesIntersect2(start, end, feature.min, feature.max) ||
feature.length > self.featuresMinMaxLimit
feature.length > self.featuresMinMaxLimit ||
(self.filteredFeatureTypes &&
!self.filteredFeatureTypes.includes(feature.type))
) {
continue
}
Expand Down Expand Up @@ -90,7 +92,9 @@ export function layoutsModelFactory(
}
if (
refName !== assembly?.getCanonicalRefName(feature.refSeq) ||
!doesIntersect2(start, end, feature.min, feature.max)
!doesIntersect2(start, end, feature.min, feature.max) ||
(self.filteredFeatureTypes &&
!self.filteredFeatureTypes.includes(feature.type))
) {
continue
}
Expand Down Expand Up @@ -226,9 +230,7 @@ export function layoutsModelFactory(
feature.min,
feature.max,
) &&
!self.seenFeatures.has(feature._id) &&
self.filteredFeatureTypes &&
self.filteredFeatureTypes.includes(feature.type)
!self.seenFeatures.has(feature._id)
) {
self.addSeenFeature(feature)
}
Expand Down
28 changes: 15 additions & 13 deletions packages/jbrowse-plugin-apollo/src/components/FilterFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,22 @@ export const FilterFeatures = observer(function FilterFeatures({
</Grid>
</Grid>
{selectedFeatureTypes.length > 0 && (
<div style={{ width: 300 }}>
<div>
<hr />
<DialogContentText>Selected feature types:</DialogContentText>
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 0.5 }}>
{selectedFeatureTypes.map((value) => (
<Chip
key={value}
label={value}
onDelete={() => {
handleFeatureTypeDelete(value)
}}
/>
))}
</Box>
<div style={{ width: 300 }}>
<DialogContentText>Selected feature types:</DialogContentText>
<Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 0.5 }}>
{selectedFeatureTypes.map((value) => (
<Chip
key={value}
label={value}
onDelete={() => {
handleFeatureTypeDelete(value)
}}
/>
))}
</Box>
</div>
</div>
)}
</DialogContent>
Expand Down

0 comments on commit c22d981

Please sign in to comment.