Thank you very much for the a2s plugin!! It is brilliant!!
I use it for process design in an intranet environment, where IE11 is mandatory for easy and save file access on our intranet server. But, unfortunately, there is an old and well known issue with zoom and scaling of inline svg in IE11.
Since a2s plugin dynamically inserts svg of varying sizes into the DOM, this scaling problem in IE11 can be very frustrating for intranet users like me, because, apparently, there exists no easy fix with CSS alone.
I found the idea for the <canvas> workaround here: https://www.mediaevent.de/tutorial/svg-responsive.html !
All it does, is, wrapping the svg.a2s with a <div> element, and placing inside the <div> element, side by side with the svg.a2s, a dummie <canvas> element, and applying some simple CSS for styling. The <canvas> element ensures proper zoom and scaling in IE11. Therefore, it needs to be fitted with the width and height of the svg.a2s, accordingly.
Here is the implementation for javascript / jQuery. It can be copied to dokuwiki/conf/userscript.js.
This fix works with multiple svg.a2s per page. Now, sizing of SVGs on the page can easily be achieved by changing the width of the canvas element. The same could probably be incorporated into the syntax.php and the style.css of the a2s plugin.
Thank you very much for the a2s plugin!! It is brilliant!!
I use it for process design in an intranet environment, where IE11 is mandatory for easy and save file access on our intranet server. But, unfortunately, there is an old and well known issue with zoom and scaling of inline svg in IE11. Since a2s plugin dynamically inserts svg of varying sizes into the DOM, this scaling problem in IE11 can be very frustrating for intranet users like me, because, apparently, there exists no easy fix with CSS alone.
I found the idea for the
<canvas>
workaround here: https://www.mediaevent.de/tutorial/svg-responsive.html ! All it does, is, wrapping thesvg.a2s
with a<div>
element, and placing inside the<div>
element, side by side with thesvg.a2s
, a dummie<canvas>
element, and applying some simple CSS for styling. The<canvas>
element ensures proper zoom and scaling in IE11. Therefore, it needs to be fitted with the width and height of thesvg.a2s
, accordingly. Here is the implementation for javascript / jQuery. It can be copied todokuwiki/conf/userscript.js
.JS:
CSS:
This fix works with multiple
svg.a2s
per page. Now, sizing of SVGs on the page can easily be achieved by changing the width of the canvas element. The same could probably be incorporated into thesyntax.php
and thestyle.css
of the a2s plugin.