# Introduction
Phrase "Scale scroll strategy" in CarnacJS means either a method formatted as follows:
import {Transformation} from '@int/geotoolkit/util/Transformation'
const myScaleScrollStrategy = function (model, inputTransformation) {
var outputTransformation = new Transformation (...);
return outputTransformation;
}or a class implementing ScaleScrollStrategy interface. The interface states the only method called adjustTransformation having the same format as the function above.
# List
Both types of strategies are internally utilized by {geotoolkit/scene/AnnotatedNode} object to drive its data model scaling/scrolling behavior when the node's setTransformation method is called.
Currently CarnacJS has (in its geotoolkit.scene namespace) eight classes:
- OneDimensionScaleScrollStrategy(options)
- KeepScaleAspectRatioStrategy(options)
- RestrictVisibleModelLimitsStrategy(options)
- RestrictScaleStrategy(options)
- AnchoredTransformationAdjustmentStrategy(options)
- KeepAspectFitBothDimensionsStrategy(options)
- KeepAspectRatioRestrictedAnchoredStrategy(options)
- KeepAspectRestrictVisibleStrategy(options)
Object approach implies tuning for non-trivial strategies (the strategies requiring additional parameters to adjust transformation); plus, unlike methods, objects can be serialized/deserialized.