From b62cee5ad818beb802df1586f606d7bfa40b7077 Mon Sep 17 00:00:00 2001 From: neauoire Date: Wed, 11 Dec 2019 10:32:31 -0500 Subject: [PATCH] Fixed interface issue --- desktop/sources/scripts/tool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/sources/scripts/tool.js b/desktop/sources/scripts/tool.js index 36b83d2..02ef7b4 100644 --- a/desktop/sources/scripts/tool.js +++ b/desktop/sources/scripts/tool.js @@ -206,9 +206,9 @@ function Tool (client) { this.source = function (type) { if (type === 'grid') { client.renderer.toggle() } if (type === 'open') { client.source.open('grid', client.whenOpen) } - if (type === 'save') { client.source.download('dotgrid', 'grid', client.tool.export(), 'text/plain') } - if (type === 'export') { client.source.download('dotgrid', 'svg', client.manager.toString(), 'image/svg+xml') } - if (type === 'render') { client.manager.toPNG(client.tool.settings.size, (dataUrl) => { client.source.download('dotgrid', 'png', dataUrl, 'image/png') }) } + if (type === 'save') { client.source.write('dotgrid', 'grid', client.tool.export(), 'text/plain') } + if (type === 'export') { client.source.write('dotgrid', 'svg', client.manager.toString(), 'image/svg+xml') } + if (type === 'render') { client.manager.toPNG(client.tool.settings.size, (dataUrl) => { client.source.write('dotgrid', 'png', dataUrl, 'image/png') }) } } this.canAppend = function (content, index = this.index) {