[release-11.5.4] Canvas: Fix layout calcs for scale mode (#103945)

Canvas: Fix layout calcs for scale mode (#103408)

(cherry picked from commit 5efb620f1b)
pull/104095/head
Drew Slobodnjak 3 months ago committed by GitHub
parent 58457c9eff
commit 22c0856880
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      public/app/features/canvas/runtime/element.tsx

@ -320,8 +320,8 @@ export class ElementState implements LayerElement {
placement.height = height;
break;
case VerticalConstraint.Scale:
placement.top = (relativeTop / (parentContainer?.height ?? height)) * 100;
placement.bottom = (relativeBottom / (parentContainer?.height ?? height)) * 100;
placement.top = (relativeTop / (parentContainer?.height ?? height)) * 100 * transformScale;
placement.bottom = (relativeBottom / (parentContainer?.height ?? height)) * 100 * transformScale;
break;
}
@ -346,8 +346,8 @@ export class ElementState implements LayerElement {
placement.width = width;
break;
case HorizontalConstraint.Scale:
placement.left = (relativeLeft / (parentContainer?.width ?? width)) * 100;
placement.right = (relativeRight / (parentContainer?.width ?? width)) * 100;
placement.left = (relativeLeft / (parentContainer?.width ?? width)) * 100 * transformScale;
placement.right = (relativeRight / (parentContainer?.width ?? width)) * 100 * transformScale;
break;
}

Loading…
Cancel
Save