|
@@ -2,6 +2,7 @@
|
|
|
* Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info.
|
|
|
*
|
|
|
* @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
|
+ * @author David Sehnal <david.sehnal@gmail.com>
|
|
|
*/
|
|
|
|
|
|
import * as React from 'react';
|
|
@@ -62,7 +63,6 @@ export class MeasurementList extends PurePluginUIComponent {
|
|
|
{this.renderGroup(measurements.distances, 'Distances')}
|
|
|
{this.renderGroup(measurements.angles, 'Angles')}
|
|
|
{this.renderGroup(measurements.dihedrals, 'Dihedrals')}
|
|
|
- {this.renderGroup(measurements.orientations, 'Orientations')}
|
|
|
</div>;
|
|
|
}
|
|
|
}
|
|
@@ -104,17 +104,10 @@ export class MeasurementControls extends PurePluginUIComponent<{}, { isBusy: boo
|
|
|
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 {
|
|
|
const history = this.selection.additionsHistory;
|
|
|
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: `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: `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 },
|