calculateScaleRotate method
dynamic
calculateScaleRotate({
- required ScaleUpdateDetails detail,
- required Layer activeLayer,
- required Size editorSize,
- required EdgeInsets screenPaddingHelper,
- required bool configEnabledHitVibration,
Calculates scaling and rotation of a layer based on user interactions.
Implementation
calculateScaleRotate({
required ScaleUpdateDetails detail,
required Layer activeLayer,
required Size editorSize,
required EdgeInsets screenPaddingHelper,
required bool configEnabledHitVibration,
}) {
_activeScale = true;
activeLayer.scale = baseScaleFactor * detail.scale;
activeLayer.rotation = baseAngleFactor + detail.rotation;
checkRotationLine(
activeLayer: activeLayer,
editorSize: editorSize,
configEnabledHitVibration: configEnabledHitVibration,
);
scaleDebounce(() => _activeScale = false);
}