Skip to content

Commit

Permalink
Merge pull request #1875: Adjust placement of focus toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin authored Oct 23, 2024
2 parents 21abe33 + af09673 commit 7bb1245
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

* Moved the "Focus on Selected" toggle next to the "Show confidence intervals" toggle.
([#1875](https://github.com/nextstrain/auspice/pull/1875))

## version 2.59.0 - 2024/10/22


Expand Down
4 changes: 2 additions & 2 deletions src/components/controls/choose-explode-attr.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class ChooseExplodeAttr extends React.Component {
return (
<div style={{paddingTop: 10}}>
<SidebarSubtitleFlex data-tip data-for="explode_tree">
<span>
<ImLab style={{ marginRight: "5px" }}/>
<span style={{ position: "relative" }}>
<ImLab style={{ position: "absolute", left: "-14px", top: "2px", fontSize: "10px" }}/>
{t("sidebar:Explode Tree By")}
</span>
{tooltip && !this.props.mobileDisplay && (
Expand Down
2 changes: 1 addition & 1 deletion src/components/controls/choose-metric.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ChooseMetric extends React.Component {

{this.props.showTreeToo ?
null : (
<div style={{margin: 5}}>
<div style={{marginBottom: 5}}>
<Toggle
display={this.props.temporalConfidence.display}
on={this.props.temporalConfidence.on}
Expand Down
2 changes: 1 addition & 1 deletion src/components/controls/controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ function Controls() {
tooltip={TreeInfo}
options={<>
<ChooseLayout />
<ToggleFocus tooltip={ToggleFocusInfo} />
<ChooseMetric />
<ToggleFocus tooltip={ToggleFocusInfo} />
<ChooseBranchLabelling />
<ChooseTipLabel />
<ChooseSecondTree />
Expand Down
6 changes: 5 additions & 1 deletion src/components/controls/toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { SidebarSubtitle } from "./styles";
const ToggleContainer = styled.div`
// Same as ToggleBackground, necessary for panel toggles.
height: 21px;
position: relative;
`

const ToggleBackground = styled.label`
Expand All @@ -31,7 +32,10 @@ const ToggleSubtitle = styled(SidebarSubtitle)`

const ExperimentalIcon = styled.span`
color: ${(props) => props.theme.color};
margin-right: 5px;
font-size: 10px;
position: absolute;
left: -12px;
top: 6px;
`

const Slider = styled.div`
Expand Down

0 comments on commit 7bb1245

Please sign in to comment.