You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you expect to happen?
When using Floor plan with large Y values the SVG should fill the width of the current window but leave enough vertical height to scroll down.
What happened instead?
Super tiny SVG that isn't really usable. Found the problem in nautobot_floor_plan/templates/nautobot_floor_plan/inc/floorplan_svg.html line 16: style="position: relative; height: 0; width: 100%; padding: 0; padding-bottom: calc(100% * ({{ floor_plan.x_size}} * {{ floor_plan.tile_depth }}) / ({{ floor_plan.y_size }} * {{ floor_plan.tile_width }}) / 2);">
The padding-bottom hack is (width percent) times (height divided by width) Changed to: style="position: relative; height: 0; width: 100%; padding: 0; padding-bottom: calc(100% * ({{ floor_plan.y_size}} * {{ floor_plan.tile_depth }}) / ({{ floor_plan.x_size }} * {{ floor_plan.tile_width }}) / 1.2);">
Will submit as a PR shortly.
I also changed the 2 to 1.2 which seems to work and look better imo.
Steps to Reproduce
Create new floor plan
Set X to 10 and Y to 30
Observe the tiny SVG
The text was updated successfully, but these errors were encountered:
Environment
What did you expect to happen?
When using Floor plan with large Y values the SVG should fill the width of the current window but leave enough vertical height to scroll down.
What happened instead?
Super tiny SVG that isn't really usable. Found the problem in nautobot_floor_plan/templates/nautobot_floor_plan/inc/floorplan_svg.html line 16:
style="position: relative; height: 0; width: 100%; padding: 0; padding-bottom: calc(100% * ({{ floor_plan.x_size}} * {{ floor_plan.tile_depth }}) / ({{ floor_plan.y_size }} * {{ floor_plan.tile_width }}) / 2);">
The padding-bottom hack is (width percent) times (height divided by width) Changed to:
style="position: relative; height: 0; width: 100%; padding: 0; padding-bottom: calc(100% * ({{ floor_plan.y_size}} * {{ floor_plan.tile_depth }}) / ({{ floor_plan.x_size }} * {{ floor_plan.tile_width }}) / 1.2);">
Will submit as a PR shortly.
I also changed the 2 to 1.2 which seems to work and look better imo.
Steps to Reproduce
The text was updated successfully, but these errors were encountered: