Skip to content

Commit

Permalink
Shift zoom fix Issue nautobot#41
Browse files Browse the repository at this point in the history
  • Loading branch information
windmite committed Jun 18, 2024
1 parent af32c3a commit 69efa8e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% if floor_plan %}
<h4>{{ floor_plan }} {% edit_button floor_plan %}</h4>
Use scroll wheel to zoom in or out. Click and drag to scroll.
Use shift+scroll wheel to zoom in or out. Click and drag to scroll.
<div class="text-center text-small">
<a href="{% url 'plugins-api:nautobot_floor_plan-api:floorplan-svg' pk=floor_plan.pk %}" class="rack_elevation_save_svg_link" download="floor_plan_{{ floor_plan.location.name }}.svg">
<i class="mdi mdi-content-save-outline"></i> Save SVG
Expand Down Expand Up @@ -64,6 +64,7 @@ <h4>{{ floor_plan }} {% edit_button floor_plan %}</h4>

// On scroll wheel in the SVG, zoom in or out
svgImage.contentDocument.addEventListener("wheel", function(e){
if (!e.shiftKey) return
e.preventDefault();
var w = viewBox.w;
var h = viewBox.h;
Expand Down

0 comments on commit 69efa8e

Please sign in to comment.