svg-pan-zoom
svg-pan-zoom copied to clipboard
Cannot set the right center-fit in safari
I found a problem with Safari (I tested it with an iphone). The center-zoom doesn't work, this is a test: https://jsfiddle.net/tobiascapin/xpvt214o/908737/show
This is the right behavior with Chrome, Firefox, also for mobile (in this img Firefox for Android):
This is the result with Safari in IPhone (I guess this is not only for mobile, but I cannot test it).
The problem seems to be the first viewport transformation, I tried to set a fixed width/height but it fails again.
I think this is the same bug as: https://github.com/ariutta/svg-pan-zoom/issues/305
This is still opened, I confirm the problem for both cases: 100% AVG width and fixed SVG with
I can confirm that this bug occurs on Safari (tested on an iPad Pro, 3rd generation). It also occurs on Chrome on iOS since Chrome is using the same view under the hood (If I'm not mistaken).
(and thanks to @tobiascapin for the jsfiddle)
Just tried here on Safari 12.1.1 (OSX), getting some unusual behaviour with the box appearing small and almost off screen (right).