Skip to content
Snippets Groups Projects
Commit 7d31a06a authored by yakomaxa's avatar yakomaxa
Browse files

Updated atom-set.ts according to suggestion by dsehnal

parent c5319ad7
No related branches found
No related tags found
No related merge requests found
...@@ -16,14 +16,11 @@ import { QueryContext, QueryFn } from '../context'; ...@@ -16,14 +16,11 @@ import { QueryContext, QueryFn } from '../context';
export function atomCount(ctx: QueryContext) { export function atomCount(ctx: QueryContext) {
return (ctx: QueryContext) => { return ctx.currentStructure.elementCount;
const all = StructureSelection.Singletons(ctx.currentStructure, ctx.currentStructure);
const x: number = StructureSelection.structureCount(all);
return x;
};
} }
export function countQuery(ctx: QueryContext, query: StructureQuery) {
export function countQuery(query: StructureQuery) {
return (ctx: QueryContext) => { return (ctx: QueryContext) => {
const sel = query(ctx); const sel = query(ctx);
const x: number = StructureSelection.structureCount(sel); const x: number = StructureSelection.structureCount(sel);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment