Last updated

API / geotoolkit / schematics / builder / KeepAspectRatioViewModeBuilder / KeepAspectRatioViewModeBuilder

Class: KeepAspectRatioViewModeBuilder

builder.KeepAspectRatioViewModeBuilder.KeepAspectRatioViewModeBuilder

Builder for schematics "KeepAspectRatio" view mode

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new KeepAspectRatioViewModeBuilder(options)

new KeepAspectRatioViewModeBuilder(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

AbstractViewModeBuilder.constructor

Methods

build

build(it, modelLimits?): Object

Builds view mode

Parameters

Name Type Description
itIterator<ComponentNode>component nodes iterator
Optional modelLimitsRectlimits to layout components within

Returns

Object

NameTypeDescription
boundsdepthsnumber[]bounds depths
modellimitsdepthsnumber[]model limits depths

Overrides

AbstractViewModeBuilder.build


getAssignedAspectRatio

getAssignedAspectRatio(name): number

Gets AspectRatio for the component; or "NoAspectRatio"-value

Parameters

Name Type Description
namestringcomponent name

Returns

number


getClassName

getClassName(): string

Returns

string

Inherited from

AbstractViewModeBuilder.getClassName


getContentModelLimits

Protected getContentModelLimits(it): Rect

Parameters

Name Type
itIterator<ComponentNode>

Returns

Rect

Inherited from

AbstractViewModeBuilder.getContentModelLimits


getOptions

getOptions(): Required<Options>

Gets builder options

Returns

Required<Options>

builder options

Overrides

AbstractViewModeBuilder.getOptions


prepareSetupComponentNodesBounds

Protected prepareSetupComponentNodesBounds(srcDepths, dstDepths): void

Parameters

Name Type
srcDepthsnumber[]
dstDepthsnumber[]

Returns

void

Inherited from

AbstractViewModeBuilder.prepareSetupComponentNodesBounds


setOptions

setOptions(options): KeepAspectRatioViewModeBuilder

Sets builder options

Parameters

Name Type Description
optionsOptionsbuilder options

Returns

KeepAspectRatioViewModeBuilder

this

Overrides

AbstractViewModeBuilder.setOptions


setupComponentNodesBounds

setupComponentNodesBounds(srcDepths, dstDepths, it, markerValueMin, markerValueMax): void

Sets up components bounds

Throws

if arrays are not defined or not equal in length

Parameters

Name Type Description
srcDepthsnumber[]srcDepths
dstDepthsnumber[]dstDepths
itIterator<ComponentNode>component nodes iterator
markerValueMinnumbermin marker value (for drawing)
markerValueMaxnumbermax marker value (for drawing)

Returns

void

Inherited from

AbstractViewModeBuilder.setupComponentNodesBounds


setupMarkersBounds

Protected setupMarkersBounds(it, markerValueMin, markerValueMax): void

Parameters

Name Type Description
itIterator<ComponentNode>component nodes iterator
markerValueMinnumbermin marker value (for drawing)
markerValueMaxnumbermax marker value (for drawing)

Returns

void

Inherited from

AbstractViewModeBuilder.setupMarkersBounds


setupNonMarkersBounds

Protected setupNonMarkersBounds(it): void

Parameters

Name Type
itIterator<ComponentNode>

Returns

void

Inherited from

AbstractViewModeBuilder.setupNonMarkersBounds


getClassName

Static getClassName(): string

Returns

string

Inherited from

AbstractViewModeBuilder.getClassName