docs(ui): update docstrings for startTransform

This commit is contained in:
psychedelicious
2024-10-16 09:25:16 +10:00
committed by Kent Keirsey
parent fc5f9047c2
commit 804ee3a7fb

View File

@@ -653,9 +653,20 @@ export class CanvasEntityTransformer extends CanvasModuleBase {
/**
* Starts the transformation of the entity.
*
* This method will asynchronously acquire a mutex to prevent concurrent operations. If you need to perform an
* operation after the transformation is started, you should await this method.
*
* @param arg Options for starting the transformation
* @param arg.silent Whether the transformation should be silent. If silent, the transform controls will not be shown,
* so you _must_ immediately call `applyTransform` or `stopTransform` to complete the transformation.
* so you _must_ call `applyTransform` or `stopTransform` to complete the transformation.
*
* @example
* ```ts
* await adapter.transformer.startTransform({ silent: true });
* adapter.transformer.fitToBboxContain();
* await adapter.transformer.applyTransform();
* ```
*/
startTransform = async (arg?: { silent: boolean }) => {
const transformingAdapter = this.manager.stateApi.$transformingAdapter.get();