From 09112e71bc775382cb1f986e7bdfd791e3f342e1 Mon Sep 17 00:00:00 2001 From: lukasmartinelli Date: Wed, 21 Sep 2016 08:41:02 +0200 Subject: [PATCH] Allow style export --- src/app.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app.jsx b/src/app.jsx index 855093f1..907a74d4 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -8,7 +8,7 @@ import Fixed from 'rebass/dist/Fixed' import { Map } from './map.jsx' import {Toolbar} from './toolbar.jsx' -import { StyleManager } from './style.js' +import style from './style.js' import { loadDefaultStyle, SettingsStore, StyleStore } from './stylestore.js' import { WorkspaceDrawer } from './workspace.jsx' @@ -47,8 +47,8 @@ export default class App extends React.Component { } onStyleDownload() { - const mapStyle = JSON.stringify(this.state.currentStyle.toJSON(), null, 4) - const blob = new Blob([mapStyle], {type: "application/json;charset=utf-8"}); + const mapStyle = style.toJSON(this.state.currentStyle) + const blob = new Blob([JSON.stringify(mapStyle, null, 4)], {type: "application/json;charset=utf-8"}); saveAs(blob, mapStyle.id + ".json"); this.onStyleSave() } @@ -116,3 +116,4 @@ export default class App extends React.Component { } } +