Skip to content

Commit

Permalink
Set image size
Browse files Browse the repository at this point in the history
  • Loading branch information
Filip Rutkowski authored and Filip Rutkowski committed Feb 13, 2024
1 parent 6616a10 commit 9e11681
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions deebot_client/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,6 @@ def get_calibrated_map(self) -> CalibratedMap | None:
self._last_image = None
return None

# Build the SVG elements
svg_map = svg.SVG()
svg_map.elements = [_SVG_DEFS]
manipulation = MapManipulation(
AxisManipulation(
map_shift=background.bounding_box[0],
Expand All @@ -631,6 +628,10 @@ def get_calibrated_map(self) -> CalibratedMap | None:
),
)

# Build the SVG elements
svg_map = svg.SVG(width=manipulation.x.svg_max, height=manipulation.y.svg_max)
svg_map.elements = [_SVG_DEFS]

# Set map viewBox based on background map bounding box.
svg_map.viewBox = svg.ViewBoxSpec(
0,
Expand Down

0 comments on commit 9e11681

Please sign in to comment.