@@ -407,7 +407,9 @@ export class CanvasEntityTransformer extends CanvasModuleBase {
407
407
*/
408
408
fitToBboxFill = ( ) => {
409
409
if ( ! this . $isTransformEnabled . get ( ) ) {
410
- this . log . warn ( 'Cannot fit to bbox contain when transform is disabled' ) ;
410
+ this . log . warn (
411
+ 'Cannot fit to bbox contain when transform is disabled. Did you forget to call `await adapter.transformer.startTransform()`?'
412
+ ) ;
411
413
return ;
412
414
}
413
415
const { rect } = this . manager . stateApi . getBbox ( ) ;
@@ -428,7 +430,9 @@ export class CanvasEntityTransformer extends CanvasModuleBase {
428
430
*/
429
431
fitToBboxContain = ( ) => {
430
432
if ( ! this . $isTransformEnabled . get ( ) ) {
431
- this . log . warn ( 'Cannot fit to bbox contain when transform is disabled' ) ;
433
+ this . log . warn (
434
+ 'Cannot fit to bbox contain when transform is disabled. Did you forget to call `await adapter.transformer.startTransform()`?'
435
+ ) ;
432
436
return ;
433
437
}
434
438
const { rect } = this . manager . stateApi . getBbox ( ) ;
@@ -460,7 +464,9 @@ export class CanvasEntityTransformer extends CanvasModuleBase {
460
464
*/
461
465
fitToBboxCover = ( ) => {
462
466
if ( ! this . $isTransformEnabled . get ( ) ) {
463
- this . log . warn ( 'Cannot fit to bbox contain when transform is disabled' ) ;
467
+ this . log . warn (
468
+ 'Cannot fit to bbox contain when transform is disabled. Did you forget to call `await adapter.transformer.startTransform()`?'
469
+ ) ;
464
470
return ;
465
471
}
466
472
const { rect } = this . manager . stateApi . getBbox ( ) ;
@@ -687,6 +693,12 @@ export class CanvasEntityTransformer extends CanvasModuleBase {
687
693
* Applies the transformation of the entity.
688
694
*/
689
695
applyTransform = async ( ) => {
696
+ if ( ! this . $isTransforming . get ( ) ) {
697
+ this . log . warn (
698
+ 'Cannot apply transform when not transforming. Did you forget to call `await adapter.transformer.startTransform()`?'
699
+ ) ;
700
+ return ;
701
+ }
690
702
this . log . debug ( 'Applying transform' ) ;
691
703
this . $isProcessing . set ( true ) ;
692
704
this . _setInteractionMode ( 'off' ) ;
0 commit comments