diff --git a/src/mol-geo/representation/structure/complex-representation.ts b/src/mol-geo/representation/structure/complex-representation.ts index 6053df8f3ee85b4cd62fdbc2066330c838496741..32d4816bf9e01e34c6188ba12d2f8c5c05ad461a 100644 --- a/src/mol-geo/representation/structure/complex-representation.ts +++ b/src/mol-geo/representation/structure/complex-representation.ts @@ -11,7 +11,7 @@ import { PickingId } from '../../util/picking'; import { Loci, EmptyLoci } from 'mol-model/loci'; import { MarkerAction } from '../../util/marker-data'; import { getQualityProps } from '../util'; -import { StructureProps, DefaultStructureProps, StructureRepresentation } from '.'; +import { StructureProps, StructureRepresentation } from '.'; import { ComplexVisual } from './complex-visual'; export function ComplexRepresentation<P extends StructureProps>(label: string, visualCtor: () => ComplexVisual<P>): StructureRepresentation<P> { @@ -19,7 +19,7 @@ export function ComplexRepresentation<P extends StructureProps>(label: string, v let _props: P function createOrUpdate(props: Partial<P> = {}, structure?: Structure) { - _props = Object.assign({}, DefaultStructureProps, _props, props, getQualityProps(props, structure)) + _props = Object.assign({}, _props, props, getQualityProps(props, structure)) if (structure) _props.colorTheme.structure = structure return Task.create('Creating StructureRepresentation', async ctx => { diff --git a/src/mol-geo/representation/structure/representation/point.ts b/src/mol-geo/representation/structure/representation/point.ts index 892ffa0c2bb51bc88ca54c052351a42ccac8654e..5a3e60475e6b7acd96843919ce763ff6fed0e15c 100644 --- a/src/mol-geo/representation/structure/representation/point.ts +++ b/src/mol-geo/representation/structure/representation/point.ts @@ -7,12 +7,9 @@ import { UnitsRepresentation } from '..'; import { ElementPointVisual, DefaultElementPointProps } from '../visual/element-point'; import { StructureRepresentation } from '../units-representation'; -import { SizeThemeProps } from 'mol-view/theme/size'; export const DefaultPointProps = { ...DefaultElementPointProps, - - sizeTheme: { name: 'uniform', value: 0.2 } as SizeThemeProps, } export type PointProps = typeof DefaultPointProps diff --git a/src/mol-geo/representation/structure/units-representation.ts b/src/mol-geo/representation/structure/units-representation.ts index 8f9f05ff1bafc6dcf13a3c7512458f00868f7e30..17f85e2f6b3b3047a1d4f4fe18d8c45bd7733b0e 100644 --- a/src/mol-geo/representation/structure/units-representation.ts +++ b/src/mol-geo/representation/structure/units-representation.ts @@ -13,14 +13,14 @@ import { PickingId } from '../../util/picking'; import { Loci, EmptyLoci, isEmptyLoci } from 'mol-model/loci'; import { MarkerAction } from '../../util/marker-data'; import { getQualityProps } from '../util'; -import { DefaultStructureProps, StructureProps } from '.'; +import { StructureProps } from '.'; export interface UnitsVisual<P extends RepresentationProps = {}> extends Visual<Unit.SymmetryGroup, P> { } export interface StructureVisual<P extends RepresentationProps = {}> extends Visual<Structure, P> { } export interface StructureRepresentation<P extends RepresentationProps = {}> extends Representation<Structure, P> { } -export function UnitsRepresentation<P extends StructureProps>(visualCtor: () => UnitsVisual<P>): StructureRepresentation<P> { +export function UnitsRepresentation<P extends StructureProps>(label: string, visualCtor: () => UnitsVisual<P>): StructureRepresentation<P> { let visuals = new Map<number, { group: Unit.SymmetryGroup, visual: UnitsVisual<P> }>() let _props: P @@ -28,7 +28,7 @@ export function UnitsRepresentation<P extends StructureProps>(visualCtor: () => let _groups: ReadonlyArray<Unit.SymmetryGroup> function createOrUpdate(props: Partial<P> = {}, structure?: Structure) { - _props = Object.assign({}, DefaultStructureProps, _props, props, getQualityProps(props, structure)) + _props = Object.assign({}, _props, props, getQualityProps(props, structure)) _props.colorTheme.structure = structure return Task.create('Creating or updating StructureRepresentation', async ctx => { @@ -120,6 +120,7 @@ export function UnitsRepresentation<P extends StructureProps>(visualCtor: () => } return { + label, get renderObjects() { const renderObjects: RenderObject[] = [] visuals.forEach(({ visual }) => { diff --git a/src/mol-geo/representation/structure/visual/element-point.ts b/src/mol-geo/representation/structure/visual/element-point.ts index 549ff4aab0f7b080c896b8ba2246889ddf114b63..924db42c3668360167b47214bfbf013e9960fa62 100644 --- a/src/mol-geo/representation/structure/visual/element-point.ts +++ b/src/mol-geo/representation/structure/visual/element-point.ts @@ -25,7 +25,8 @@ import { createTransforms } from '../../../util/transform-data'; export const DefaultElementPointProps = { ...DefaultStructureProps, - sizeTheme: { name: 'physical' } as SizeThemeProps, + + sizeTheme: { name: 'uniform', value: 0.2 } as SizeThemeProps, pointSizeAttenuation: true, } export type ElementPointProps = Partial<typeof DefaultElementPointProps> @@ -75,7 +76,6 @@ export function ElementPointVisual(): UnitsVisual<ElementPointProps> { vertices = await createElementPointVertices(ctx, unit, vertices) renderObject = await createUnitsPointRenderObject(ctx, group, vertices, locationIt, currentProps) - console.log(renderObject) } else if (renderObject) { if (group) currentGroup = group