Skip to content
Snippets Groups Projects
Commit 15932dc5 authored by Alexander Rose's avatar Alexander Rose
Browse files

handle parent in Structure.remapModel

parent 7db22059
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ Note that since we don't clearly distinguish between a public and private interf
- Added ``ViewerOptions.collapseRightPanel``
- Added ``Viewer.loadTrajectory`` to support loading "composed" trajectories (e.g. from gro + xtc)
- Fix: handle parent in Structure.remapModel
## [v2.3.6] - 2021-11-8
......
......@@ -355,8 +355,8 @@ class Structure {
return this.models.indexOf(m);
}
remapModel(m: Model) {
const { dynamicBonds, interUnitBonds } = this.state;
remapModel(m: Model): Structure {
const { dynamicBonds, interUnitBonds, parent } = this.state;
const units: Unit[] = [];
for (const ug of this.unitSymmetryGroups) {
const unit = ug.units[0].remapModel(m, dynamicBonds);
......@@ -367,6 +367,7 @@ class Structure {
}
}
return Structure.create(units, {
parent: parent?.remapModel(m),
label: this.label,
interUnitBonds: dynamicBonds ? undefined : interUnitBonds,
dynamicBonds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment