diff --git a/src/mol-plugin/ui/structure/selection.tsx b/src/mol-plugin/ui/structure/selection.tsx index 60cf2aec97c2b38df6e94c93b72ab7396d3f2a3b..e1c539d5d1d235e2870f203ab1a3cf49f9dec78e 100644 --- a/src/mol-plugin/ui/structure/selection.tsx +++ b/src/mol-plugin/ui/structure/selection.tsx @@ -46,8 +46,8 @@ export class StructureSelectionControls<P, S extends StructureSelectionControlsS focus = () => { const { extraRadius, minRadius, durationMs } = this.state + if (this.plugin.helpers.structureSelectionManager.stats.elementCount === 0) return const { sphere } = this.plugin.helpers.structureSelectionManager.getBoundary(); - if (sphere.radius === 0) return const radius = Math.max(sphere.radius + extraRadius, minRadius); this.plugin.canvas3d.camera.focus(sphere.center, radius, durationMs); }