Last updated

API / geotoolkit / scene / KeepScaleAspectRatioStrategy / KeepScaleAspectRatioStrategy

Class: KeepScaleAspectRatioStrategy

scene.KeepScaleAspectRatioStrategy.KeepScaleAspectRatioStrategy

KeepScaleAspectRatioStrategy input transformation adjustment. Keeps transformation scale when parent bounds were changed, if not possible scales with keeping aspect ratio

Hierarchy

Table of contents

Constructors
Methods
Css Properties
Name Type Description
alignmentAnchorTypeAlignment
aspectrationumberY-scale to x-scale ratio
enabledbooleanEnable flag
wrappedbooleanTrue if model limits should be wrapped

Contents

Constructors

new KeepScaleAspectRatioStrategy(options)

new KeepScaleAspectRatioStrategy(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

ScaleScrollStrategy.constructor

Methods

adjustTransformation

adjustTransformation(model, newTr): Transformation

Adjusts input transformation

Parameters

Name Type Description
modelGroup<Node>model
newTrTransformationtransformation to adjust

Returns

Transformation

adjusted transformation

Overrides

ScaleScrollStrategy.adjustTransformation


getAlignment

getAlignment(): AnchorType

Returns strategy alignment

Returns

AnchorType


getAspectRatio

getAspectRatio(): number

Returns strategy aspect ratio

Returns

number


getClassName

getClassName(): string

Returns

string

Inherited from

ScaleScrollStrategy.getClassName


getProperties

getProperties(): OptionsOut

Gets properties

Returns

OptionsOut

properties

Overrides

ScaleScrollStrategy.getProperties


isEnabled

isEnabled(): boolean

Returns enable state

Returns

boolean

enable state

Inherited from

ScaleScrollStrategy.isEnabled


isWrapped

isWrapped(): boolean

Returns strategy wrapping flag

Returns

boolean


setAlignment

setAlignment(alignment): KeepScaleAspectRatioStrategy

Sets strategy alignment

Parameters

Name Type Description
alignmentAnchorTypestrategy alignment

Returns

KeepScaleAspectRatioStrategy

this


setAspectRatio

setAspectRatio(aspectRatio): KeepScaleAspectRatioStrategy

Sets strategy aspect ratio

Parameters

Name Type Description
aspectRationumberstrategy aspect ratio

Returns

KeepScaleAspectRatioStrategy

this


setEnabled

setEnabled(enabled): KeepScaleAspectRatioStrategy

Set enable state

Parameters

Name Type Description
enabledbooleansets the enabled state

Returns

KeepScaleAspectRatioStrategy

this

Inherited from

ScaleScrollStrategy.setEnabled


setOptions

setOptions(options?): KeepScaleAspectRatioStrategy

Sets scale scroll options

Deprecated

since 4.1, use setProperties() instead

Parameters

Name Type Description
Optional optionsOptionsobject

Returns

KeepScaleAspectRatioStrategy

this


setProperties

setProperties(properties): KeepScaleAspectRatioStrategy

Sets the projection properties

Parameters

Name Type Description
propertiesOptionsproperties

Returns

KeepScaleAspectRatioStrategy

this

Overrides

ScaleScrollStrategy.setProperties


setWrapped

setWrapped(wrapped): KeepScaleAspectRatioStrategy

Sets is strategy model is wrapped

Parameters

Name Type
wrappedboolean

Returns

KeepScaleAspectRatioStrategy

this


getClassName

Static getClassName(): string

Returns

string

Inherited from

ScaleScrollStrategy.getClassName