fix grapheditor image export buh

This commit is contained in:
lxsang 2020-10-02 14:44:19 +00:00
parent 416ab0d93a
commit e3862fb0f5
8 changed files with 11 additions and 4 deletions

View File

@ -4,6 +4,9 @@ Generate graph from text using mermaid
## Change logs ## Change logs
### v0.0.6-a
* Fix unable to export image from tainted canvas
### v0.0.5-a ### v0.0.5-a
* GraphEditor is now compatible with new AntOS API * GraphEditor is now compatible with new AntOS API

View File

@ -4,6 +4,9 @@ Generate graph from text using mermaid
## Change logs ## Change logs
### v0.0.6-a
* Fix unable to export image from tainted canvas
### v0.0.5-a ### v0.0.5-a
* GraphEditor is now compatible with new AntOS API * GraphEditor is now compatible with new AntOS API

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
"email": "xsang.le@gmail.com", "email": "xsang.le@gmail.com",
"licences": "GPLv3" "licences": "GPLv3"
}, },
"version":"0.0.5-a", "version":"0.0.6-a",
"category":"Office", "category":"Office",
"iconclass": "fa fa-sitemap", "iconclass": "fa fa-sitemap",
"mimes":["text/.*graphviz"] "mimes":["text/.*graphviz"]

View File

@ -228,6 +228,7 @@ class GraphEditor extends this.OS.application.BaseApplication
svgToCanvas: (f) -> svgToCanvas: (f) ->
img = new Image() img = new Image()
img.crossOrigin="anonymous"
svgStr = @svgtext() svgStr = @svgtext()
DOMURL = window.URL || window.webkitURL || window DOMURL = window.URL || window.webkitURL || window
svgBlob = new Blob [svgStr], { type: 'image/svg+xml;charset=utf-8' } svgBlob = new Blob [svgStr], { type: 'image/svg+xml;charset=utf-8' }

View File

@ -7,7 +7,7 @@
"email": "xsang.le@gmail.com", "email": "xsang.le@gmail.com",
"licences": "GPLv3" "licences": "GPLv3"
}, },
"version":"0.0.5-a", "version":"0.0.6-a",
"category":"Office", "category":"Office",
"iconclass": "fa fa-sitemap", "iconclass": "fa fa-sitemap",
"mimes":["text/.*graphviz"] "mimes":["text/.*graphviz"]

View File

@ -77,7 +77,7 @@
"description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GraphEditor/README.md", "description": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GraphEditor/README.md",
"category": "Office", "category": "Office",
"author": "Xuan Sang LE", "author": "Xuan Sang LE",
"version": "0.0.5-a", "version": "0.0.6-a",
"download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GraphEditor/build/release/GraphEditor.zip" "download": "https://raw.githubusercontent.com/lxsang/antosdk-apps/master/GraphEditor/build/release/GraphEditor.zip"
}, },
{ {