Skip to content

Commit

Permalink
Fixed HtmlSVGShapePeer: stroke width was not considered in viewBox co…
Browse files Browse the repository at this point in the history
…mputation
  • Loading branch information
salmonb committed Nov 23, 2023
1 parent 997b52b commit 63bd226
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void computeViewBox() {
width = Math.abs(node.getEndX() - node.getStartX());
height = Math.abs(node.getEndY() - node.getStartY());
addExtraOnEffect();
addExtraOnStrokeWidth();
increaseViewBoxWithStrokeWidth();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ void computeViewBox() {
y = bBox.y;
width = bBox.width;
height = bBox.height;
increaseViewBoxWithStrokeWidth();
}

void addExtraOnEffect() {
Expand All @@ -70,7 +71,7 @@ void addExtraOnEffect() {
}
}

void addExtraOnStrokeWidth() {
void increaseViewBoxWithStrokeWidth() {
// Adding extra space if there is a stroke
N node = getNode();
double strokeWidth = node.getStrokeWidth();
Expand Down

0 comments on commit 63bd226

Please sign in to comment.