diff --git a/src/mol-plugin/behavior/dynamic/camera.ts b/src/mol-plugin/behavior/dynamic/camera.ts index 6441b9518f15fb821f5b3354f600ca56fc1967a6..bc60d36870ddf6a467170b53a9ecba6ae0c2be0a 100644 --- a/src/mol-plugin/behavior/dynamic/camera.ts +++ b/src/mol-plugin/behavior/dynamic/camera.ts @@ -16,7 +16,7 @@ const M = ModifiersKeys const Trigger = Binding.Trigger const DefaultFocusLociBindings = { - clickCenterFocus: Binding(Trigger(B.Flag.Primary, M.create()), 'Center and focus the clicked element.'), + clickCenterFocus: Binding(Trigger(B.Flag.Primary, M.create()), 'Center and focus the clicked element using ${trigger}.'), } const FocusLociParams = { minRadius: PD.Numeric(8, { min: 1, max: 50, step: 1 }), diff --git a/src/mol-plugin/behavior/dynamic/representation.ts b/src/mol-plugin/behavior/dynamic/representation.ts index 488d2540a17f20415e161ad7b0e287a2e410e922..6df35c23918d7523208b9d735efe44880d3c4ede 100644 --- a/src/mol-plugin/behavior/dynamic/representation.ts +++ b/src/mol-plugin/behavior/dynamic/representation.ts @@ -66,11 +66,10 @@ export const HighlightLoci = PluginBehavior.create({ const DefaultSelectLociBindings = { clickSelect: Binding.Empty, - clickSelectExtend: Binding(Trigger(B.Flag.Primary, M.create({ shift: true })), 'Try to extend selection to clicked element along polymer.'), - clickSelectOnly: Binding(Trigger(B.Flag.Secondary, M.create({ control: true })), 'Select only the clicked element.'), - clickSelectToggle: Binding(Trigger(B.Flag.Primary, M.create({ control: true })), 'Toggle clicked element.'), + clickSelectExtend: Binding(Trigger(B.Flag.Primary, M.create({ shift: true })), 'Extend selection to clicked element along polymer using ${trigger}.'), + clickSelectOnly: Binding(Trigger(B.Flag.Secondary, M.create({ control: true })), 'Select only the clicked element using ${trigger}.'), + clickSelectToggle: Binding(Trigger(B.Flag.Primary, M.create({ control: true })), 'Toggle selection of clicked element using ${trigger}.'), clickDeselect: Binding.Empty, - clickDeselectAllOnEmpty: Binding(Trigger(B.Flag.Secondary, M.create({ control: true })), 'Clear the selection when the clicked element is empty.'), } const SelectLociParams = { bindings: PD.Value(DefaultSelectLociBindings, { isHidden: true }), @@ -120,10 +119,6 @@ export const SelectLoci = PluginBehavior.create({ if (Binding.match(this.params.bindings.clickDeselect, buttons, modifiers)) { this.ctx.interactivity.lociSelects.deselect(current) } - - if (Binding.match(this.params.bindings.clickDeselectAllOnEmpty, buttons, modifiers)) { - this.ctx.interactivity.lociSelects.deselectAllOnEmpty(current) - } }); this.ctx.interactivity.lociSelects.addProvider(this.lociMarkProvider) diff --git a/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts b/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts index 3bc669889861f264eb92fd58ba6854034aa70faa..c794c2b0a8900c6c1cf8fa28bb83f9fcf16808c6 100644 --- a/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts +++ b/src/mol-plugin/behavior/dynamic/selection/structure-representation-interaction.ts @@ -27,7 +27,7 @@ const M = ModifiersKeys const Trigger = Binding.Trigger const DefaultStructureRepresentationInteractionBindings = { - clickInteractionAroundOnly: Binding(Trigger(B.Flag.Secondary, M.create()), 'Show the structure interaction around only the clicked element.'), + clickInteractionAroundOnly: Binding(Trigger(B.Flag.Secondary, M.create()), 'Show the structure interaction around only the clicked element using ${trigger}.'), } const StructureRepresentationInteractionParams = { bindings: PD.Value(DefaultStructureRepresentationInteractionBindings, { isHidden: true }), diff --git a/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts b/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts index d29d5fe3b6a9cccc9dda752a6f225bbd80a19ee5..51b37fede568bf532aa4a2844070943396305933 100644 --- a/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts +++ b/src/mol-plugin/behavior/dynamic/volume-streaming/behavior.ts @@ -50,7 +50,7 @@ export namespace VolumeStreaming { }; const DefaultBindings = { - clickVolumeAroundOnly: Binding(Trigger(B.Flag.Secondary, M.create()), 'Show the volume around only the clicked element.'), + clickVolumeAroundOnly: Binding(Trigger(B.Flag.Secondary, M.create()), 'Show the volume around only the clicked element using ${trigger}.'), } export function createParams(data?: VolumeServerInfo.Data, defaultView?: ViewTypes) { diff --git a/src/mol-plugin/ui/sequence/wrapper.ts b/src/mol-plugin/ui/sequence/wrapper.ts index 275b315a143ff5153e3ceb85597d867b85eebc0e..fb04fecf4d73c7747b84137e14cf0bbcf493e24d 100644 --- a/src/mol-plugin/ui/sequence/wrapper.ts +++ b/src/mol-plugin/ui/sequence/wrapper.ts @@ -4,8 +4,8 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { OrderedSet } from '../../../mol-data/int'; -import { Loci } from '../../../mol-model/loci'; +import { OrderedSet, Interval } from '../../../mol-data/int'; +import { Loci, isEveryLoci } from '../../../mol-model/loci'; import { MarkerAction, applyMarkerAction } from '../../../mol-util/marker-action'; import { StructureElement, Structure, Unit } from '../../../mol-model/structure'; import { Color } from '../../../mol-util/color'; @@ -22,9 +22,13 @@ abstract class SequenceWrapper<D> { abstract getLoci(seqIdx: number): StructureElement.Loci markResidue(loci: Loci, action: MarkerAction) { - return this.eachResidue(loci, (set: OrderedSet) => { - return applyMarkerAction(this.markerArray, set, action) - }) + if (isEveryLoci(loci)) { + return applyMarkerAction(this.markerArray, Interval.ofLength(this.length), action) + } else { + return this.eachResidue(loci, (set: OrderedSet) => { + return applyMarkerAction(this.markerArray, set, action) + }) + } } constructor(readonly data: D, readonly markerArray: Uint8Array, readonly length: number) {