Skip to content
Snippets Groups Projects
Commit 1316cc6a authored by Alexander Rose's avatar Alexander Rose
Browse files

fix StructureSelectionControls.focus for single element

parent 944d370c
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment