From 7d31a06ae4d7e326514f30f68ceeaaafdf96b8fc Mon Sep 17 00:00:00 2001 From: yakomaxa <47655565+yakomaxa@users.noreply.github.com> Date: Tue, 16 Aug 2022 12:50:02 +0900 Subject: [PATCH] Updated atom-set.ts according to suggestion by dsehnal --- src/mol-model/structure/query/queries/atom-set.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mol-model/structure/query/queries/atom-set.ts b/src/mol-model/structure/query/queries/atom-set.ts index 6f9f96617..ae30073d4 100644 --- a/src/mol-model/structure/query/queries/atom-set.ts +++ b/src/mol-model/structure/query/queries/atom-set.ts @@ -16,14 +16,11 @@ import { QueryContext, QueryFn } from '../context'; export function atomCount(ctx: QueryContext) { - return (ctx: QueryContext) => { - const all = StructureSelection.Singletons(ctx.currentStructure, ctx.currentStructure); - const x: number = StructureSelection.structureCount(all); - return x; - }; + return ctx.currentStructure.elementCount; } -export function countQuery(ctx: QueryContext, query: StructureQuery) { + +export function countQuery(query: StructureQuery) { return (ctx: QueryContext) => { const sel = query(ctx); const x: number = StructureSelection.structureCount(sel); -- GitLab