Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
9f12fbde
Commit
9f12fbde
authored
Nov 26, 2019
by
David Sehnal
Browse files
Options
Downloads
Patches
Plain Diff
mol-plugin: param help tweaks
parent
940b16eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-plugin/ui/controls/parameters.tsx
+7
-5
7 additions, 5 deletions
src/mol-plugin/ui/controls/parameters.tsx
with
7 additions
and
5 deletions
src/mol-plugin/ui/controls/parameters.tsx
+
7
−
5
View file @
9f12fbde
...
@@ -83,7 +83,7 @@ export class ParamHelp<L extends LegendData> extends React.PureComponent<{ legen
...
@@ -83,7 +83,7 @@ export class ParamHelp<L extends LegendData> extends React.PureComponent<{ legen
return
<
div
className
=
'msp-control-row msp-help-text'
>
return
<
div
className
=
'msp-control-row msp-help-text'
>
<
div
>
<
div
>
<
div
className
=
'msp-help-description'
><
span
className
=
{
`msp-icon msp-icon-help-circle`
}
/>
{
description
}
</
div
>
<
div
className
=
'msp-help-description'
><
span
className
=
{
`msp-icon msp-icon-help-circle`
}
/>
{
description
}
</
div
>
<
div
className
=
'msp-help-legend'
>
{
Legend
&&
<
Legend
legend
=
{
legend
}
/>
}
</
div
>
{
Legend
&&
<
div
className
=
'msp-help-legend'
><
Legend
legend
=
{
legend
}
/></
div
>
}
</
div
>
</
div
>
</
div
>
</
div
>
}
}
...
@@ -123,13 +123,15 @@ export abstract class SimpleParam<P extends PD.Any> extends React.PureComponent<
...
@@ -123,13 +123,15 @@ export abstract class SimpleParam<P extends PD.Any> extends React.PureComponent<
const
help
=
this
.
props
.
param
.
help
const
help
=
this
.
props
.
param
.
help
?
this
.
props
.
param
.
help
(
this
.
props
.
value
)
?
this
.
props
.
param
.
help
(
this
.
props
.
value
)
:
{
description
:
this
.
props
.
param
.
description
,
legend
:
this
.
props
.
param
.
legend
}
:
{
description
:
this
.
props
.
param
.
description
,
legend
:
this
.
props
.
param
.
legend
}
const
desc
=
this
.
props
.
param
.
description
;
const
hasHelp
=
help
.
description
||
help
.
legend
const
hasHelp
=
help
.
description
||
help
.
legend
return
<>
return
<>
<
div
className
=
{
this
.
className
}
>
<
div
className
=
{
this
.
className
}
>
<
span
title
=
{
this
.
props
.
param
.
description
}
>
<
span
title
=
{
desc
}
>
{
label
}
{
label
}
{
hasHelp
&&
{
hasHelp
&&
<
button
className
=
'msp-help msp-btn-link msp-btn-icon msp-control-group-expander'
onClick
=
{
this
.
toggleExpanded
}
title
=
{
`
${
this
.
state
.
isExpanded
?
'
Hide
'
:
'
Show
'
}
help`
}
<
button
className
=
'msp-help msp-btn-link msp-btn-icon msp-control-group-expander'
onClick
=
{
this
.
toggleExpanded
}
title
=
{
desc
||
`
${
this
.
state
.
isExpanded
?
'
Hide
'
:
'
Show
'
}
help`
}
style
=
{
{
background
:
'
transparent
'
,
textAlign
:
'
left
'
,
padding
:
'
0
'
}
}
>
style
=
{
{
background
:
'
transparent
'
,
textAlign
:
'
left
'
,
padding
:
'
0
'
}
}
>
<
span
className
=
{
`msp-icon msp-icon-help-circle-
${
this
.
state
.
isExpanded
?
'
collapse
'
:
'
expand
'
}
`
}
/>
<
span
className
=
{
`msp-icon msp-icon-help-circle-
${
this
.
state
.
isExpanded
?
'
collapse
'
:
'
expand
'
}
`
}
/>
</
button
>
</
button
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment