Skip to content

editorGlobalsIOrientedPositioningAnchor

Interface: IOrientedPositioningAnchor

An OrientedPositioningAnchor is an PositioningAnchor which provides methods to get and set it's orientation relative to some direction (eg an edge direction) in his global space.

Hierarchy

IPositioningAnchor

IOrientedPositioningAnchor

Implemented by

Index

Properties

Methods

Properties

getLocalAngle

getLocalAngle: function

Defined in src/model/data/Concepts/Anchors/IPositioningAnchor.ts:11

Type declaration:

▸ (): number


setLocalAngle

setLocalAngle: function

Defined in src/model/data/Concepts/Anchors/IPositioningAnchor.ts:12

Type declaration:

▸ (angle: number): void

Parameters:

Name Type
angle number

Methods

clone

clone(): IPositioningAnchor

Inherited from IOrientedPositioningAnchor.clone

Overrides IAnchor.clone

Defined in src/model/data/Concepts/Anchors/IPositioningAnchor.ts:43

see IAnchor.clone()

Returns: IPositioningAnchor


destroy

destroy(): any

Inherited from IAnchor.destroy

Defined in src/model/data/Concepts/Anchors/IAnchor.ts:41

Once an anchor is not used anymore, it should be destroyed in order to prevent memory leaks (as anchors might bind to other events and this prevents garbage collection).

The destroy() call must unbind from all events to remove all references to the anchor, but first make sure that no one listens to the anchor's own events to prevent wrong usage.

A destroyed anchor must not be valid anymore, and must not be used anymore.

Returns: any


getChangeEventEmitter

getChangeEventEmitter(): IPublicEventEmitterInterfaceIAnchorChangeEvent

Inherited from IAnchor.getChangeEventEmitter

Defined in src/model/data/Concepts/Anchors/IAnchor.ts:22

Changes of the getTargets can result in an onChange event of the anchor.

Returns: IPublicEventEmitterInterfaceIAnchorChangeEvent


getIsValid

getIsValid(): boolean

Inherited from IAnchor.getIsValid

Defined in src/model/data/Concepts/Anchors/IAnchor.ts:68

Whether this instance is valid, a.k.a. has a valid target assigned and points to something useful within that target. IModelElementDependencyDefiner might invalidate if the target changes.

If the IModelElementDependencyDefiner does not need a target, it can be valid even without having one defined.

Validity should be lazily evaluated and not destructive action should be (automatically) taken if the anchor is invalid. Only high level control classes (Realizers, Tools, BoxelCSG) should clean up invalid anchors and model elements. An anchor becoming invalid should not trigger any events.

Returns: boolean


getTargets

getTargets(): IModelElement[]

Inherited from IAnchor.getTargets

Defined in src/model/data/Concepts/Anchors/IAnchor.ts:55

The targets this IModelElementDependencyDefiner points to. This means that the IModelElementDependencyDefiner itself depends on some specifics of the target IModelElements.

Usually, there will be one target. Some implementations, however, may define zero or multiple targets.

Returns: IModelElement[]


getTransforms

getTransforms(): IReadOnlyTransforms

Inherited from IOrientedPositioningAnchor.getTransforms

Defined in src/model/data/Concepts/Anchors/IPositioningAnchor.ts:85

Use the transforms to read out the current alignment in space.

The "local" part of the transforms should always be understood as a the object-local coordinate system of the IPositionableElement that uses this anchor to position itself, while the "global" part (and getPosition()/getRotation()) should be understood as assembly space coordinates.

Returns: IReadOnlyTransforms


getTransformsChangeEventEmitter

getTransformsChangeEventEmitter(): IPublicEventEmitterInterfaceITransformsChangeEvent

Inherited from IOrientedPositioningAnchor.getTransformsChangeEventEmitter

Defined in src/model/data/Concepts/Anchors/IPositioningAnchor.ts:38

IPositionableElement that use this anchor must subscribe to this event in order to react to transform changes (and emit a change event themselves). Consequently, the anchor must emit this event if its transforms change.

see TransformsChangeEvent to check what fields have to be provided

If only the transforms change, the anchors getChangeEventEmitter() event must not be fired.

Returns: IPublicEventEmitterInterfaceITransformsChangeEvent


getTransformsTargets

getTransformsTargets(): IPositionableElementTransformsDefiner[]

Inherited from IOrientedPositioningAnchor.getTransformsTargets

Defined in src/model/data/Concepts/Anchors/IPositioningAnchor.ts:75

Similar to IModelElementDependencyDefiner.getTargets(), the transforms targets are those transformsDefiner that influence this transformsDefiner's transforms.

If the transformsDefiner's target element is an IPositionableElement, it probably also influences the transforms. Thus, in this case, target.getTransformsDefiner() must be contained in the returned list.

Only direct dependencies should be returned, so if you have a chain A -> B -> C and call A.getTransformsTargets() this method only returns [B]. For a complete list of all transitive dependencies @see ModelElementGraphAnalyzer.getAllModelElementThisDependsOn.

If the transformsDefiner does not define any transforms targets and has no IModelElement as a target, it is considered self-sustainable, i.e. being able of defining a coordinate system on its own without external input.

Returns: IPositionableElementTransformsDefiner[]