Fix #8252
This commit is contained in:
parent
8fbbfc1ad5
commit
672d0017d2
1 changed files with 4 additions and 4 deletions
|
@ -505,7 +505,7 @@ function AddHorizontalSelfMarginsDimension(
|
||||||
): void {
|
): void {
|
||||||
const style = container.properties.dimensionOptions.selfMarginsDimensions;
|
const style = container.properties.dimensionOptions.selfMarginsDimensions;
|
||||||
const left = container.properties.margin.left;
|
const left = container.properties.margin.left;
|
||||||
if (left != null) {
|
if (left != null && left > 0) {
|
||||||
const id = `dim-y-margin-left${yDim.toFixed(0)}-${container.properties.id}`;
|
const id = `dim-y-margin-left${yDim.toFixed(0)}-${container.properties.id}`;
|
||||||
const xStart = container.properties.x + currentTransform[0] - left;
|
const xStart = container.properties.x + currentTransform[0] - left;
|
||||||
const xEnd = xStart + left;
|
const xEnd = xStart + left;
|
||||||
|
@ -527,7 +527,7 @@ function AddHorizontalSelfMarginsDimension(
|
||||||
}
|
}
|
||||||
|
|
||||||
const right = container.properties.margin.right;
|
const right = container.properties.margin.right;
|
||||||
if (right != null) {
|
if (right != null && right > 0) {
|
||||||
const id = `dim-y-margin-right${yDim.toFixed(0)}-${container.properties.id}`;
|
const id = `dim-y-margin-right${yDim.toFixed(0)}-${container.properties.id}`;
|
||||||
const xStart = container.properties.x + container.properties.width + currentTransform[0];
|
const xStart = container.properties.x + container.properties.width + currentTransform[0];
|
||||||
const xEnd = xStart + right;
|
const xEnd = xStart + right;
|
||||||
|
@ -559,7 +559,7 @@ function AddVerticalSelfMarginDimension(
|
||||||
): void {
|
): void {
|
||||||
const style = container.properties.dimensionOptions.selfMarginsDimensions;
|
const style = container.properties.dimensionOptions.selfMarginsDimensions;
|
||||||
const top = container.properties.margin.top;
|
const top = container.properties.margin.top;
|
||||||
if (top != null) {
|
if (top != null && top > 0) {
|
||||||
const idVert = `dim-x-margin-top${xDim.toFixed(0)}-${container.properties.id}`;
|
const idVert = `dim-x-margin-top${xDim.toFixed(0)}-${container.properties.id}`;
|
||||||
let yStart = container.properties.y + currentTransform[1];
|
let yStart = container.properties.y + currentTransform[1];
|
||||||
let yEnd = yStart - top;
|
let yEnd = yStart - top;
|
||||||
|
@ -585,7 +585,7 @@ function AddVerticalSelfMarginDimension(
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const bottom = container.properties.margin.bottom;
|
const bottom = container.properties.margin.bottom;
|
||||||
if (bottom != null) {
|
if (bottom != null && bottom > 0) {
|
||||||
const idVert = `dim-x-margin-bottom${xDim.toFixed(0)}-${container.properties.id}`;
|
const idVert = `dim-x-margin-bottom${xDim.toFixed(0)}-${container.properties.id}`;
|
||||||
let yStart = container.properties.y + container.properties.height + bottom + currentTransform[1];
|
let yStart = container.properties.y + container.properties.height + bottom + currentTransform[1];
|
||||||
let yEnd = yStart - bottom;
|
let yEnd = yStart - bottom;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue