Leandro Lucarella  committed 9e55a29

aafig: Don't override width and height for SVG images

If width or height options are already present in the figure, don't override
them with the width and height provided by the aafigure visitor.

  • Participants
  • Parent commits 670b329

Comments (0)

Files changed (1)

File aafig/sphinxcontrib/

         # FIXME: find some way to avoid this hack in aafigure
         if extra:
             (width, height) = [x.split('"')[1] for x in extra.split()]
-            (img['width'], img['height']) = (width, height)
+            if not img.has_key('width'):
+                img['width'] = width
+            if not img.has_key('height'):
+                img['height'] = height
 def render_aafigure(app, text, options):