bumbu / svg-pan-zoom

JavaScript library that enables panning and zooming of an SVG in an HTML document, with mouse events or custom JavaScript hooks
https://github.com/ariutta/svg-pan-zoom#demos
BSD 2-Clause "Simplified" License
1.76k stars 389 forks source link

The svg property "preserveAspectRatio" does not work. #434

Open alcaidio opened 1 year ago

alcaidio commented 1 year ago

Bug report

Expected behaviour

use preserveAspectRatio correctly https://user-images.githubusercontent.com/17033036/204895590-873697d5-b78d-4212-af43-08df76b73e23.mov

Actual behaviour

The svg property "preserveAspectRatio" does not work. https://user-images.githubusercontent.com/17033036/204895550-50395456-863d-4a19-9a86-ab3eb083098c.mov

Steps to reproduce the behaviour

  1. create an instance of SvgPanZoom
  2. set properties of svg element (ex: preserveAspectRatio: xMidYMid meet)
  3. It doesn't work :/

Configuration