Skip to content

Commit

Permalink
846 Calc View Wire_Dia Search tooltip sometimes fails to clear
Browse files Browse the repository at this point in the history
  • Loading branch information
1fifoto committed Jul 30, 2023
1 parent 7e38a76 commit 21dfc94
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
15 changes: 9 additions & 6 deletions client/src/components/SymbolValue.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,13 +458,16 @@ class SymbolValue extends Component {
{display_search_button ?
<>
{this.props.element.type === "equationset" && this.props.element.input && this.props.element.lmin & FIXED && free_variables.length > 0 ?
<OverlayTrigger placement="top" overlay={<Tooltip>
The Independent Variable {this.props.element.name} is Fixed. Search manipulates only the values of Free Independent Variables. Press this <img src="SearchButton.png" alt="SearchButton"/> button to alter the values, {free_variables} to locate a feasible solution (if available).
</Tooltip>}>
<Button variant={this.props.search_completed ? "secondary" : "primary"} onClick={this.onSearchRequest} disabled={this.props.search_completed}><b>Search</b> (solve)</Button>
</OverlayTrigger>
(this.props.search_completed ?
<Button variant="secondary" onClick={this.onSearchRequest} disabled><b>Search</b> (solve)</Button>
:
<Button variant={this.props.search_completed ? "secondary" : "primary"} onClick={this.onSearchRequest} disabled={this.props.search_completed}><b>Search</b> (solve)</Button>}
<OverlayTrigger placement="top" overlay={<Tooltip>
The Independent Variable {this.props.element.name} is Fixed. Search manipulates only the values of Free Independent Variables. Press this <img src="SearchButton.png" alt="SearchButton"/> button to alter the values, {free_variables} to locate a feasible solution (if available).
</Tooltip>}>
<Button variant="primary" onClick={this.onSearchRequest}><b>Search</b> (solve)</Button>
</OverlayTrigger>)
:
<Button variant={this.props.search_completed ? "secondary" : "primary"} onClick={this.onSearchRequest} disabled={this.props.search_completed}><b>Search</b> (solve)</Button>}
<Button variant={this.props.search_completed ? "primary" : "secondary"} disabled={this.state.isInvalidValue || this.state.isInvalidMinConstraint || this.state.isInvalidMaxConstraint} onClick={this.onClose}>Close</Button>
</>
:
Expand Down
15 changes: 9 additions & 6 deletions client/src/designtypes/Spring/SymbolValueWireDia.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,16 @@ class SymbolValueWireDia extends Component {
{display_search_button ?
<>
{(this.props.element.lmin & FIXED && free_variables.length > 0) ?
<OverlayTrigger placement="top" overlay={<Tooltip>
The Independent Variable {this.props.element.name} is Fixed. Search manipulates only the values of Free Independent Variables. Press this <img src="SearchButton.png" alt="SearchButton"/> button to alter the values, {free_variables} to locate a feasible solution (if available).
</Tooltip>}>
<Button variant={this.props.search_completed ? "secondary" : "primary"} onClick={this.onSearchRequest} disabled={this.props.search_completed}><b>Search</b> (solve)</Button>
</OverlayTrigger>
(this.props.search_completed ?
<Button variant="secondary" onClick={this.onSearchRequest} disabled><b>Search</b> (solve)</Button>
:
<Button variant={this.props.search_completed ? "secondary" : "primary"} onClick={this.onSearchRequest} disabled={this.props.search_completed}><b>Search</b> (solve)</Button>}
<OverlayTrigger placement="top" overlay={<Tooltip>
The Independent Variable {this.props.element.name} is Fixed. Search manipulates only the values of Free Independent Variables. Press this <img src="SearchButton.png" alt="SearchButton"/> button to alter the values, {free_variables} to locate a feasible solution (if available).
</Tooltip>}>
<Button variant="primary" onClick={this.onSearchRequest}><b>Search</b> (solve)</Button>
</OverlayTrigger>)
:
<Button variant={this.props.search_completed ? "secondary" : "primary"} onClick={this.onSearchRequest} disabled={this.props.search_completed}><b>Search</b> (solve)</Button>}
<Button variant={this.props.search_completed ? "primary" : "secondary"} disabled={this.state.isInvalidValue || this.state.isInvalidMinConstraint || this.state.isInvalidMaxConstraint} onClick={this.onClose}>Close</Button>
</>
:
Expand Down

0 comments on commit 21dfc94

Please sign in to comment.