Commit 953d42f5 authored by Romain Casati's avatar Romain Casati

Fix download in graphviz.

parent d5ce1ecd
......@@ -7,8 +7,6 @@ import logging
import platform
import subprocess
import basthon
import js
import base64
......@@ -228,7 +226,7 @@ def render(engine, format, filepath, renderer=None, formatter=None, quiet=False,
svg = pipe(engine, 'svg', data, renderer, formatter, quiet)
if format == 'svg':
basthon.download(svg, rendered)
js.Basthon.download(svg, rendered)
else:
download_png_from_svg(svg, rendered, scale)
return rendered
......@@ -250,7 +248,7 @@ def download_png_from_svg(svg, filename, scale):
data = canvas.toDataURL("image/png")
data = base64.b64decode(data.split(',')[-1])
basthon.download(data, filename)
js.Basthon.download(data, filename)
svg_image.onload = img_loaded
svg_image.src = svg_data_url
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment