Skip to main content

Class: EveryScopeStage

processTargets/modifiers/EveryScopeStage.EveryScopeStage

This modifier returns all scopes intersecting the input target if the target has an explicit range (ie Target.hasExplicitRange is true). If the target does not have an explicit range, this modifier returns all scopes in the canonical iteration scope defined by the scope handler in {@link ScopeHandler.getIterationScopesTouchingPosition}.

We proceed as follows:

  1. If target has an explicit range, call {@link ScopeHandler.getScopesOverlappingRange} on our scope handler. If we get back at least one TargetScope whose domain terminates within the input target range, just return all targets directly.
  2. If we didn't get any scopes that terminate within the input target, or if the target had no explicit range, then expand to the containing instance of ScopeHandler.iterationScopeType, and then return all targets returned from {@link ScopeHandler.getScopesOverlappingRange} when applied to the expanded target's Target.contentRange.

Implements

Constructors

constructor

new EveryScopeStage(modifier)

Parameters

NameType
modifierEveryScopeModifier

Defined in

processTargets/modifiers/EveryScopeStage.ts:35

Methods

getDefaultIterationRange

getDefaultIterationRange(context, scopeHandler, target): Range

Parameters

NameType
contextProcessedTargetsContext
scopeHandlerScopeHandler
targetTarget

Returns

Range

Defined in

processTargets/modifiers/EveryScopeStage.ts:84


run

run(context, target): Target[]

Parameters

NameType
contextProcessedTargetsContext
targetTarget

Returns

Target[]

Implementation of

ModifierStage.run

Defined in

processTargets/modifiers/EveryScopeStage.ts:37