|
@@ -32,8 +32,7 @@ import { BaseGeometry } from '../../mol-geo/geometry/base';
|
|
|
import { ValueCell } from '../../mol-util/value-cell';
|
|
|
|
|
|
export const VolumeIsosurfaceParams = {
|
|
|
- isoValue: Volume.IsoValueParam,
|
|
|
- pickingGranularity: PD.Select<'voxels' | 'surfaces'>('voxels', [['voxels', 'Voxels'], ['surfaces', 'Surfaces']]),
|
|
|
+ isoValue: Volume.IsoValueParam
|
|
|
};
|
|
|
export type VolumeIsosurfaceParams = typeof VolumeIsosurfaceParams
|
|
|
export type VolumeIsosurfaceProps = PD.Values<VolumeIsosurfaceParams>
|
|
@@ -67,8 +66,12 @@ function getLoci(volume: Volume, props: VolumeIsosurfaceProps) {
|
|
|
|
|
|
function getIsosurfaceLoci(pickingId: PickingId, volume: Volume, props: VolumeIsosurfaceProps, id: number) {
|
|
|
const { objectId, groupId } = pickingId;
|
|
|
+
|
|
|
if (id === objectId) {
|
|
|
- if (props.pickingGranularity === 'surfaces') {
|
|
|
+ const granularity = Volume.PickingGranularity.get(volume);
|
|
|
+ if (granularity === 'volume') {
|
|
|
+ return Volume.Loci(volume);
|
|
|
+ } else if (granularity === 'object') {
|
|
|
return Volume.Isosurface.Loci(volume, props.isoValue);
|
|
|
} else {
|
|
|
return Volume.Cell.Loci(volume, Interval.ofSingleton(groupId as Volume.CellIndex));
|