diff --git a/src/Components/SVG/Elements/DimensionLayer.tsx b/src/Components/SVG/Elements/DimensionLayer.tsx index 67054e1..4b7995b 100644 --- a/src/Components/SVG/Elements/DimensionLayer.tsx +++ b/src/Components/SVG/Elements/DimensionLayer.tsx @@ -505,7 +505,7 @@ function AddHorizontalSelfMarginsDimension( ): void { const style = container.properties.dimensionOptions.selfMarginsDimensions; 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 xStart = container.properties.x + currentTransform[0] - left; const xEnd = xStart + left; @@ -527,7 +527,7 @@ function AddHorizontalSelfMarginsDimension( } 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 xStart = container.properties.x + container.properties.width + currentTransform[0]; const xEnd = xStart + right; @@ -559,7 +559,7 @@ function AddVerticalSelfMarginDimension( ): void { const style = container.properties.dimensionOptions.selfMarginsDimensions; 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}`; let yStart = container.properties.y + currentTransform[1]; let yEnd = yStart - top; @@ -585,7 +585,7 @@ function AddVerticalSelfMarginDimension( ); } 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}`; let yStart = container.properties.y + container.properties.height + bottom + currentTransform[1]; let yEnd = yStart - bottom;