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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
8f4bf9a3
Commit
8f4bf9a3
authored
5 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
added outsideControls to PluginLayoutStateParams
parent
cca0f407
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/mol-plugin/layout.ts
+2
-1
2 additions, 1 deletion
src/mol-plugin/layout.ts
src/mol-plugin/ui/plugin.tsx
+19
-1
19 additions, 1 deletion
src/mol-plugin/ui/plugin.tsx
with
21 additions
and
2 deletions
src/mol-plugin/layout.ts
+
2
−
1
View file @
8f4bf9a3
...
@@ -12,7 +12,8 @@ import { PluginCommands } from './command';
...
@@ -12,7 +12,8 @@ import { PluginCommands } from './command';
// TODO: support collapsed state control orientation
// TODO: support collapsed state control orientation
export
const
PluginLayoutStateParams
=
{
export
const
PluginLayoutStateParams
=
{
isExpanded
:
PD
.
Boolean
(
false
),
isExpanded
:
PD
.
Boolean
(
false
),
showControls
:
PD
.
Boolean
(
true
)
showControls
:
PD
.
Boolean
(
true
),
outsideControls
:
PD
.
Boolean
(
true
,
{
isHidden
:
true
})
}
}
export
type
PluginLayoutStateProps
=
PD
.
Values
<
typeof
PluginLayoutStateParams
>
export
type
PluginLayoutStateProps
=
PD
.
Values
<
typeof
PluginLayoutStateParams
>
...
...
This diff is collapsed.
Click to expand it.
src/mol-plugin/ui/plugin.tsx
+
19
−
1
View file @
8f4bf9a3
...
@@ -85,12 +85,30 @@ class Layout extends PluginUIComponent {
...
@@ -85,12 +85,30 @@ class Layout extends PluginUIComponent {
return
classList
.
join
(
'
'
)
return
classList
.
join
(
'
'
)
}
}
get
layoutClassName
()
{
const
layout
=
this
.
plugin
.
layout
.
state
;
const
classList
:
string
[]
=
[
'
msp-plugin-content
'
]
if
(
layout
.
isExpanded
)
{
classList
.
push
(
'
msp-layout-expanded
'
)
}
else
{
classList
.
push
(
'
msp-layout-standard
'
)
if
(
layout
.
outsideControls
)
{
classList
.
push
(
'
msp-layout-standard-outside
'
)
}
else
{
classList
.
push
(
'
msp-layout-standard-landscape
'
)
}
}
return
classList
.
join
(
'
'
)
}
render
()
{
render
()
{
const
layout
=
this
.
plugin
.
layout
.
state
;
const
layout
=
this
.
plugin
.
layout
.
state
;
const
controls
=
(
this
.
plugin
.
spec
.
layout
&&
this
.
plugin
.
spec
.
layout
.
controls
)
||
{
};
const
controls
=
(
this
.
plugin
.
spec
.
layout
&&
this
.
plugin
.
spec
.
layout
.
controls
)
||
{
};
return
<
div
className
=
'msp-plugin'
>
return
<
div
className
=
'msp-plugin'
>
<
div
className
=
{
`msp-plugin-content
${
layout
.
isExpanded
?
'
msp-layout-expanded
'
:
'
msp-layout-standard msp-layout-standard-outside
'
}
`
}
>
<
div
className
=
{
this
.
layoutClassName
}
>
<
div
className
=
{
this
.
layoutVisibilityClassName
}
>
<
div
className
=
{
this
.
layoutVisibilityClassName
}
>
{
this
.
region
(
'
main
'
,
ViewportWrapper
)
}
{
this
.
region
(
'
main
'
,
ViewportWrapper
)
}
{
layout
.
showControls
&&
controls
.
top
!==
'
none
'
&&
this
.
region
(
'
top
'
,
controls
.
top
||
SequenceView
)
}
{
layout
.
showControls
&&
controls
.
top
!==
'
none
'
&&
this
.
region
(
'
top
'
,
controls
.
top
||
SequenceView
)
}
...
...
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