aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rw-r--r--src_js/common.js6
-rw-r--r--src_py/opcut/server.py4
3 files changed, 8 insertions, 4 deletions
diff --git a/VERSION b/VERSION
index 1d0ba9e..267577d 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.4.0
+0.4.1
diff --git a/src_js/common.js b/src_js/common.js
index b489914..1d718b8 100644
--- a/src_js/common.js
+++ b/src_js/common.js
@@ -29,9 +29,13 @@ export async function calculate() {
if (!res.ok)
throw await res.text();
const result = await res.json();
+ const selected = {
+ panel: Object.keys(result.params.panels)[0],
+ item: null
+ };
r.change(u.pipe(
u.set('result', result),
- u.set('selected', states.main.selected)
+ u.set('selected', selected)
));
if (!result)
throw 'Could not resolve calculation';
diff --git a/src_py/opcut/server.py b/src_py/opcut/server.py
index 379a571..8501aaa 100644
--- a/src_py/opcut/server.py
+++ b/src_py/opcut/server.py
@@ -94,10 +94,10 @@ class Server(aio.Resource):
output = await _generate(output_format, panel, result)
- if output_format == common.OutputType.PDF:
+ if output_format == common.OutputFormat.PDF:
content_type = 'application/pdf'
- elif output_format == common.OutputType.SVG:
+ elif output_format == common.OutputFormat.SVG:
content_type = 'image/svg+xml'
else: