Skip to content
Snippets Groups Projects
Commit 3dda801c authored by Michal Malý's avatar Michal Malý
Browse files

ReDNATCO plugin stage 25

parent 77491547
No related branches found
No related tags found
No related merge requests found
......@@ -967,32 +967,40 @@ export class ReDNATCOMspViewer {
}
async actionApplyFilter(filter: Filters.All) {
await this.plugin.state.data.build()
.to(IDs.ID('structure', 'nucleic', BaseRef))
.update(
StateTransforms.Model.StructureSelectionFromExpression,
old => ({
...old,
expression: Filtering.toExpression(filter)
})
)
.to(IDs.ID('structure', 'protein', BaseRef))
.update(
StateTransforms.Model.StructureSelectionFromExpression,
old => ({
...old,
expression: Filtering.toExpression(filter)
})
)
.to(IDs.ID('structure', 'protein', BaseRef))
.update(
StateTransforms.Model.StructureSelectionFromExpression,
old => ({
...old,
expression: Filtering.toExpression(filter)
})
)
.commit();
const b = this.plugin.state.data.build();
if (this.has('structure', 'nucleic', BaseRef)) {
b.to(IDs.ID('structure', 'nucleic', BaseRef))
.update(
StateTransforms.Model.StructureSelectionFromExpression,
old => ({
...old,
expression: Filtering.toExpression(filter)
})
);
}
if (this.has('structure', 'protein', BaseRef)) {
b.to(IDs.ID('structure', 'protein', BaseRef))
.update(
StateTransforms.Model.StructureSelectionFromExpression,
old => ({
...old,
expression: Filtering.toExpression(filter)
})
);
}
if (this.has('structure', 'water', BaseRef)) {
b.to(IDs.ID('structure', 'water', BaseRef))
.update(
StateTransforms.Model.StructureSelectionFromExpression,
old => ({
...old,
expression: Filtering.toExpression(filter)
})
);
}
await b.commit();
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment