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

removed orientation from measurements for now

- too limited and confusing
parent 79b33bfb
Branches
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info. * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
* *
* @author Alexander Rose <alexander.rose@weirdbyte.de> * @author Alexander Rose <alexander.rose@weirdbyte.de>
* @author David Sehnal <david.sehnal@gmail.com>
*/ */
import * as React from 'react'; import * as React from 'react';
...@@ -62,7 +63,6 @@ export class MeasurementList extends PurePluginUIComponent { ...@@ -62,7 +63,6 @@ export class MeasurementList extends PurePluginUIComponent {
{this.renderGroup(measurements.distances, 'Distances')} {this.renderGroup(measurements.distances, 'Distances')}
{this.renderGroup(measurements.angles, 'Angles')} {this.renderGroup(measurements.angles, 'Angles')}
{this.renderGroup(measurements.dihedrals, 'Dihedrals')} {this.renderGroup(measurements.dihedrals, 'Dihedrals')}
{this.renderGroup(measurements.orientations, 'Orientations')}
</div>; </div>;
} }
} }
...@@ -104,17 +104,10 @@ export class MeasurementControls extends PurePluginUIComponent<{}, { isBusy: boo ...@@ -104,17 +104,10 @@ export class MeasurementControls extends PurePluginUIComponent<{}, { isBusy: boo
this.plugin.managers.structure.measurement.addLabel(loci[0].loci); this.plugin.managers.structure.measurement.addLabel(loci[0].loci);
} }
addOrientation = () => {
// TODO: this should be possible to add for the whole selection
const loci = this.plugin.managers.structure.selection.additionsHistory;
this.plugin.managers.structure.measurement.addOrientation(loci[0].loci);
}
get actions(): ActionMenu.Items { get actions(): ActionMenu.Items {
const history = this.selection.additionsHistory; const history = this.selection.additionsHistory;
const ret: ActionMenu.Item[] = [ const ret: ActionMenu.Item[] = [
{ kind: 'item', label: `Label ${history.length === 0 ? ' (1 selection required)' : ' (1st selection)'}`, value: this.addLabel, disabled: history.length === 0 }, { kind: 'item', label: `Label ${history.length === 0 ? ' (1 selection required)' : ' (1st selection)'}`, value: this.addLabel, disabled: history.length === 0 },
{ kind: 'item', label: `Orientation ${history.length === 0 ? ' (1 selection required)' : ' (1st selection)'}`, value: this.addOrientation, disabled: history.length === 0 },
{ kind: 'item', label: `Distance ${history.length < 2 ? ' (2 selections required)' : ' (top 2 selections)'}`, value: this.measureDistance, disabled: history.length < 2 }, { kind: 'item', label: `Distance ${history.length < 2 ? ' (2 selections required)' : ' (top 2 selections)'}`, value: this.measureDistance, disabled: history.length < 2 },
{ kind: 'item', label: `Angle ${history.length < 3 ? ' (3 selections required)' : ' (top 3 selections)'}`, value: this.measureAngle, disabled: history.length < 3 }, { kind: 'item', label: `Angle ${history.length < 3 ? ' (3 selections required)' : ' (top 3 selections)'}`, value: this.measureAngle, disabled: history.length < 3 },
{ kind: 'item', label: `Dihedral ${history.length < 4 ? ' (4 selections required)' : ' (top 4 selections)'}`, value: this.measureDihedral, disabled: history.length < 4 }, { kind: 'item', label: `Dihedral ${history.length < 4 ? ' (4 selections required)' : ' (top 4 selections)'}`, value: this.measureDihedral, disabled: history.length < 4 },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment