From b7d059e1e221bc3894d29c7764db1ecdca1a8b09 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Fri, 9 Feb 2018 22:10:58 +0100 Subject: [PATCH] fix svg export --- src/editor.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/editor.ts b/src/editor.ts index b3f411c..041942b 100644 --- a/src/editor.ts +++ b/src/editor.ts @@ -60,9 +60,6 @@ import { const DIRTY_CLASS = 'jp-mod-dirty'; -// MIME Extension packgage.json: -// "mimeExtension": "lib/mime" - export class DrawioWidget extends Widget implements DocumentRegistry.IReadyWidget { @@ -75,8 +72,6 @@ class DrawioWidget extends Widget implements DocumentRegistry.IReadyWidget { this.context.ready.then(() => { this._onContextReady(); }); this.context.ready.then(() => { this._handleDirtyState(); }); - - // this.node.style.minWidth = '100%'; } protected onAfterShow(msg: Message): void { @@ -84,6 +79,10 @@ class DrawioWidget extends Widget implements DocumentRegistry.IReadyWidget { this._onContentChanged(); } + public getSVG() : string { + return mx.mxUtils.getXml(this._editor.editor.graph.getSvg()); + } + private _onContextReady() : void { const contextModel = this.context.model;