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
73a883df
Commit
73a883df
authored
6 years ago
by
David Sehnal
Browse files
Options
Downloads
Patches
Plain Diff
mol-plugin: fixed a bug where behaviors were not assigned correct default params
parent
21aae7ec
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/mol-plugin/behavior/dynamic/labels.ts
+1
-0
1 addition, 0 deletions
src/mol-plugin/behavior/dynamic/labels.ts
src/mol-plugin/context.ts
+1
-1
1 addition, 1 deletion
src/mol-plugin/context.ts
src/mol-plugin/index.ts
+1
-3
1 addition, 3 deletions
src/mol-plugin/index.ts
with
3 additions
and
4 deletions
src/mol-plugin/behavior/dynamic/labels.ts
+
1
−
0
View file @
73a883df
...
@@ -74,6 +74,7 @@ function getLabelsText(data: LabelsData, props: PD.Values<Text.Params>, text?: T
...
@@ -74,6 +74,7 @@ function getLabelsText(data: LabelsData, props: PD.Values<Text.Params>, text?: T
export
const
SceneLabels
=
PluginBehavior
.
create
<
SceneLabelsProps
>
({
export
const
SceneLabels
=
PluginBehavior
.
create
<
SceneLabelsProps
>
({
name
:
'
scene-labels
'
,
name
:
'
scene-labels
'
,
display
:
{
name
:
'
Scene Labels
'
,
group
:
'
Labels
'
},
display
:
{
name
:
'
Scene Labels
'
,
group
:
'
Labels
'
},
canAutoUpdate
:
()
=>
true
,
ctor
:
class
extends
PluginBehavior
.
Handler
<
SceneLabelsProps
>
{
ctor
:
class
extends
PluginBehavior
.
Handler
<
SceneLabelsProps
>
{
private
data
:
LabelsData
=
{
private
data
:
LabelsData
=
{
transforms
:
[
Mat4
.
identity
()],
transforms
:
[
Mat4
.
identity
()],
...
...
This diff is collapsed.
Click to expand it.
src/mol-plugin/context.ts
+
1
−
1
View file @
73a883df
...
@@ -136,7 +136,7 @@ export class PluginContext {
...
@@ -136,7 +136,7 @@ export class PluginContext {
const
tree
=
this
.
state
.
behaviorState
.
tree
.
build
();
const
tree
=
this
.
state
.
behaviorState
.
tree
.
build
();
for
(
const
b
of
this
.
spec
.
behaviors
)
{
for
(
const
b
of
this
.
spec
.
behaviors
)
{
tree
.
toRoot
().
apply
(
b
.
transformer
,
b
.
defaultParams
||
{
}
,
{
ref
:
b
.
transformer
.
id
});
tree
.
toRoot
().
apply
(
b
.
transformer
,
b
.
defaultParams
,
{
ref
:
b
.
transformer
.
id
});
}
}
await
this
.
runTask
(
this
.
state
.
behaviorState
.
update
(
tree
));
await
this
.
runTask
(
this
.
state
.
behaviorState
.
update
(
tree
));
...
...
This diff is collapsed.
Click to expand it.
src/mol-plugin/index.ts
+
1
−
3
View file @
73a883df
...
@@ -14,8 +14,6 @@ import { PluginSpec } from './spec';
...
@@ -14,8 +14,6 @@ import { PluginSpec } from './spec';
import
{
DownloadStructure
,
CreateComplexRepresentation
,
OpenStructure
}
from
'
./state/actions/basic
'
;
import
{
DownloadStructure
,
CreateComplexRepresentation
,
OpenStructure
}
from
'
./state/actions/basic
'
;
import
{
StateTransforms
}
from
'
./state/transforms
'
;
import
{
StateTransforms
}
from
'
./state/transforms
'
;
import
{
PluginBehaviors
}
from
'
./behavior
'
;
import
{
PluginBehaviors
}
from
'
./behavior
'
;
import
{
ParamDefinition
as
PD
}
from
'
mol-util/param-definition
'
import
{
SceneLabelsParams
}
from
'
./behavior/dynamic/labels
'
;
function
getParam
(
name
:
string
,
regex
:
string
):
string
{
function
getParam
(
name
:
string
,
regex
:
string
):
string
{
let
r
=
new
RegExp
(
`
${
name
}
=(
${
regex
}
)[&]?`
,
'
i
'
);
let
r
=
new
RegExp
(
`
${
name
}
=(
${
regex
}
)[&]?`
,
'
i
'
);
...
@@ -40,7 +38,7 @@ const DefaultSpec: PluginSpec = {
...
@@ -40,7 +38,7 @@ const DefaultSpec: PluginSpec = {
PluginSpec
.
Behavior
(
PluginBehaviors
.
Representation
.
DefaultLociLabelProvider
),
PluginSpec
.
Behavior
(
PluginBehaviors
.
Representation
.
DefaultLociLabelProvider
),
PluginSpec
.
Behavior
(
PluginBehaviors
.
Camera
.
FocusLociOnSelect
,
{
minRadius
:
20
,
extraRadius
:
4
}),
PluginSpec
.
Behavior
(
PluginBehaviors
.
Camera
.
FocusLociOnSelect
,
{
minRadius
:
20
,
extraRadius
:
4
}),
PluginSpec
.
Behavior
(
PluginBehaviors
.
Animation
.
StructureAnimation
,
{
rotate
:
false
,
rotateValue
:
0
,
explode
:
false
,
explodeValue
:
0
}),
PluginSpec
.
Behavior
(
PluginBehaviors
.
Animation
.
StructureAnimation
,
{
rotate
:
false
,
rotateValue
:
0
,
explode
:
false
,
explodeValue
:
0
}),
PluginSpec
.
Behavior
(
PluginBehaviors
.
Labels
.
SceneLabels
,
{
...
PD
.
getDefaultValues
(
SceneLabelsParams
)
}),
// TODO how to properly call PluginBehaviors.Labels.SceneLabels.definition.params(
)
PluginSpec
.
Behavior
(
PluginBehaviors
.
Labels
.
SceneLabels
)
,
PluginSpec
.
Behavior
(
PluginBehaviors
.
CustomProps
.
PDBeStructureQualityReport
,
{
autoAttach
:
true
}),
PluginSpec
.
Behavior
(
PluginBehaviors
.
CustomProps
.
PDBeStructureQualityReport
,
{
autoAttach
:
true
}),
PluginSpec
.
Behavior
(
PluginBehaviors
.
CustomProps
.
RCSBAssemblySymmetry
,
{
autoAttach
:
true
}),
PluginSpec
.
Behavior
(
PluginBehaviors
.
CustomProps
.
RCSBAssemblySymmetry
,
{
autoAttach
:
true
}),
]
]
...
...
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