API / geotoolkit / scene / KeepScaleAspectRatioStrategy / KeepScaleAspectRatioStrategy
scene.KeepScaleAspectRatioStrategy.KeepScaleAspectRatioStrategy
KeepScaleAspectRatioStrategy input transformation adjustment. Keeps transformation scale when parent bounds were changed, if not possible scales with keeping aspect ratio
↳
KeepScaleAspectRatioStrategy
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
alignment | AnchorType | Alignment |
aspectratio | number | Y-scale to x-scale ratio |
enabled | boolean | Enable flag |
wrapped | boolean | True if model limits should be wrapped |
Constructors
• new KeepScaleAspectRatioStrategy(options?)
| Name | Type |
|---|---|
Optional options | Options |
ScaleScrollStrategy.constructor
Methods
▸ adjustTransformation(model, newTr): Transformation
Adjusts input transformation
| Name | Type | Description |
|---|---|---|
model | Group<Node> | model |
newTr | Transformation | transformation to adjust |
adjusted transformation
ScaleScrollStrategy.adjustTransformation
▸ getAlignment(): AnchorType
Returns strategy alignment
▸ getAspectRatio(): number
Returns strategy aspect ratio
number
▸ getClassName(): string
string
ScaleScrollStrategy.getClassName
▸ getProperties(): OptionsOut
Gets properties
properties
ScaleScrollStrategy.getProperties
▸ isEnabled(): boolean
Returns enable state
boolean
enable state
▸ isWrapped(): boolean
Returns strategy wrapping flag
boolean
▸ setAlignment(alignment): KeepScaleAspectRatioStrategy
Sets strategy alignment
| Name | Type | Description |
|---|---|---|
alignment | AnchorType | strategy alignment |
this
▸ setAspectRatio(aspectRatio): KeepScaleAspectRatioStrategy
Sets strategy aspect ratio
| Name | Type | Description |
|---|---|---|
aspectRatio | number | strategy aspect ratio |
this
▸ setEnabled(enabled): KeepScaleAspectRatioStrategy
Set enable state
| Name | Type | Description |
|---|---|---|
enabled | boolean | sets the enabled state |
this
ScaleScrollStrategy.setEnabled
▸ setOptions(options?): KeepScaleAspectRatioStrategy
Sets scale scroll options
Deprecated
since 4.1, use setProperties() instead
| Name | Type | Description |
|---|---|---|
Optional options | Options | object |
this
▸ setProperties(properties): KeepScaleAspectRatioStrategy
Sets the projection properties
| Name | Type | Description |
|---|---|---|
properties | Options | properties |
this
ScaleScrollStrategy.setProperties
▸ setWrapped(wrapped): KeepScaleAspectRatioStrategy
Sets is strategy model is wrapped
| Name | Type |
|---|---|
wrapped | boolean |
this
▸ Static getClassName(): string
string