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
c9b70495
Commit
c9b70495
authored
5 years ago
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
fixed ExplodeStructureRepresentation3D
parent
da71332d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-plugin/state/transforms/representation.ts
+5
-4
5 additions, 4 deletions
src/mol-plugin/state/transforms/representation.ts
with
5 additions
and
4 deletions
src/mol-plugin/state/transforms/representation.ts
+
5
−
4
View file @
c9b70495
...
@@ -300,9 +300,9 @@ const ExplodeStructureRepresentation3D = PluginStateTransform.BuiltIn({
...
@@ -300,9 +300,9 @@ const ExplodeStructureRepresentation3D = PluginStateTransform.BuiltIn({
canAutoUpdate
()
{
canAutoUpdate
()
{
return
true
;
return
true
;
},
},
apply
({
a
,
params
,
spine
})
{
apply
({
a
,
params
})
{
const
rootStructure
=
spine
.
getRootOfType
(
SO
.
Molecule
.
Structure
)
!
.
data
;
const
structure
=
a
.
data
.
source
.
data
;
const
structure
=
a
.
data
.
source
.
data
;
const
rootStructure
=
structure
.
parent
||
structure
;
const
unitTransforms
=
new
StructureUnitTransforms
(
rootStructure
);
const
unitTransforms
=
new
StructureUnitTransforms
(
rootStructure
);
explodeStructure
(
structure
,
unitTransforms
,
params
.
t
);
explodeStructure
(
structure
,
unitTransforms
,
params
.
t
);
return
new
SO
.
Molecule
.
Structure
.
Representation3DState
({
return
new
SO
.
Molecule
.
Structure
.
Representation3DState
({
...
@@ -312,8 +312,9 @@ const ExplodeStructureRepresentation3D = PluginStateTransform.BuiltIn({
...
@@ -312,8 +312,9 @@ const ExplodeStructureRepresentation3D = PluginStateTransform.BuiltIn({
source
:
a
source
:
a
},
{
label
:
`Explode T =
${
params
.
t
.
toFixed
(
2
)}
`
});
},
{
label
:
`Explode T =
${
params
.
t
.
toFixed
(
2
)}
`
});
},
},
update
({
a
,
b
,
newParams
,
oldParams
,
spine
})
{
update
({
a
,
b
,
newParams
,
oldParams
})
{
const
rootStructure
=
spine
.
getRootOfType
(
SO
.
Molecule
.
Structure
)
!
.
data
;
const
structure
=
a
.
data
.
source
.
data
;
const
rootStructure
=
structure
.
parent
||
structure
;
if
(
b
.
data
.
info
!==
rootStructure
)
return
StateTransformer
.
UpdateResult
.
Recreate
;
if
(
b
.
data
.
info
!==
rootStructure
)
return
StateTransformer
.
UpdateResult
.
Recreate
;
if
(
oldParams
.
t
===
newParams
.
t
)
return
StateTransformer
.
UpdateResult
.
Unchanged
;
if
(
oldParams
.
t
===
newParams
.
t
)
return
StateTransformer
.
UpdateResult
.
Unchanged
;
const
unitTransforms
=
b
.
data
.
state
.
unitTransforms
!
;
const
unitTransforms
=
b
.
data
.
state
.
unitTransforms
!
;
...
...
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