Skip to content

Commit

Permalink
Fix boundingBox handling of null values
Browse files Browse the repository at this point in the history
  • Loading branch information
edemaine committed Jan 25, 2023
1 parent b5b35d7 commit 2616e85
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/svgtiler.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2032,10 +2032,10 @@ class Render extends HasSettings
dx = (symbol.boundingBox[0] - symbol.viewBox[0]) * scaleX
dy = (symbol.boundingBox[1] - symbol.viewBox[1]) * scaleY
@expandBox [
x + dx
y + dy
symbol.boundingBox[2] * scaleX
symbol.boundingBox[3] * scaleY
x + dx if symbol.boundingBox[0]?
y + dy if symbol.boundingBox[1]?
symbol.boundingBox[2] * scaleX if symbol.boundingBox[2]?
symbol.boundingBox[3] * scaleY if symbol.boundingBox[3]?
]
else
@expandBox [tile.xMin, tile.yMin, tile.width, tile.height]
Expand Down

0 comments on commit 2616e85

Please sign in to comment.