mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 01:00:33 +08:00
Canvas: Fix layout calcs for scale mode (#103408)
This commit is contained in:
@ -334,8 +334,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;
|
||||
}
|
||||
|
||||
@ -360,8 +360,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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user