From ab779d091bb82fb0ac60b2787baf2d1442692c3c Mon Sep 17 00:00:00 2001 From: Raruto Date: Tue, 6 Feb 2024 14:48:51 +0100 Subject: [PATCH] delete `src/app/gui/charts/chartsfactory.js` --- src/app/api.js | 13 ++++++++++--- src/app/gui/charts/chartsfactory.js | 20 -------------------- 2 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 src/app/gui/charts/chartsfactory.js diff --git a/src/app/api.js b/src/app/api.js index 29eef145e..50b4f9f34 100644 --- a/src/app/api.js +++ b/src/app/api.js @@ -363,7 +363,13 @@ const g3wsdk = { InputsComponents }, Charts: { - ChartsFactory, + ChartsFactory: { + /** @param type: : */ + build({ type, hooks = {} } = {}) { + const [library='c3', chartType='lineXY'] = type.split(':'); + return Object.assign(hooks, this.CHARTS[library][chartType]); + } + }, c3: { lineXY: C3XYLine } @@ -431,7 +437,8 @@ const g3wsdk = { }; // BACKOMP v3.x -g3wsdk.core.geometry = { Geom: g3wsdk.core.geoutils, Geometry: g3wsdk.core.geoutils.Geometry }; -g3wsdk.core.layer.geometry = { geom: g3wsdk.core.geoutils, Geometry: g3wsdk.core.geoutils.Geometry }; +g3wsdk.core.geometry = { Geom: g3wsdk.core.geoutils, Geometry: g3wsdk.core.geoutils.Geometry }; +g3wsdk.core.layer.geometry = { geom: g3wsdk.core.geoutils, Geometry: g3wsdk.core.geoutils.Geometry }; +g3wsdk.gui.vue.Charts.ChartsFactory.CHARTS = { c3: { lineXY: C3XYLine } }; module.exports = g3wsdk; \ No newline at end of file diff --git a/src/app/gui/charts/chartsfactory.js b/src/app/gui/charts/chartsfactory.js deleted file mode 100644 index da6bb0255..000000000 --- a/src/app/gui/charts/chartsfactory.js +++ /dev/null @@ -1,20 +0,0 @@ -import C3XYLine from 'components/C3XYLine.vue'; - -const Chartsfactory = { - CHARTS: { - c3: { - lineXY: C3XYLine - } - }, - /* - * type: : - * */ - build({type, hooks={}} = {}) { - const [library='c3', chartType='lineXY'] = type.split(':'); - const chartVue = this.CHARTS[library][chartType]; - return Object.assign(hooks, chartVue); - } -}; - - -module.exports = Chartsfactory;