diff client/src/components/fairway/AvailableFairwayDepth.vue @ 3927:03f37e64701c

Factored out default template for diagrams in a single file.
author Sascha Wilde <wilde@intevation.de>
date Thu, 11 Jul 2019 16:55:31 +0200
parents 32b656e77e2f
children f9de2ea2706e
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepth.vue	Thu Jul 11 16:25:56 2019 +0200
+++ b/client/src/components/fairway/AvailableFairwayDepth.vue	Thu Jul 11 16:55:31 2019 +0200
@@ -80,6 +80,7 @@
 import { HTTP } from "@/lib/http";
 import { displayError } from "@/lib/errors";
 import { FREQUENCIES } from "@/store/fairwayavailability";
+import { defaultDiagramTemplate } from "@/lib/DefaultDiagramTemplate";
 
 const hoursInDays = x => x / 24;
 
@@ -106,34 +107,7 @@
       },
       templateData: null,
       templates: [],
-      defaultTemplate: {
-        name: "Default",
-        properties: {
-          paperSize: "a4"
-        },
-        elements: [
-          {
-            type: "diagram",
-            position: "topleft",
-            offset: { x: 20, y: 30 },
-            width: 200,
-            height: 60
-          },
-          {
-            type: "diagramtitle",
-            position: "topleft",
-            offset: { x: 70, y: 20 },
-            fontsize: 20,
-            color: "steelblue"
-          },
-          {
-            type: "diagramlegend",
-            position: "topleft",
-            offset: { x: 30, y: 170 },
-            color: "black"
-          }
-        ]
-      }
+      defaultTemplate: defaultDiagramTemplate
     };
   },
   created() {