From 2c7500f1bbbb7bfb0522343fb18a51df1a254d9d Mon Sep 17 00:00:00 2001 From: Xaver Maierhofer Date: Sun, 5 Nov 2017 18:23:40 +0100 Subject: [PATCH] [TASK] Make more colors configurable --- app.js | 2 -- config.default.json | 58 +++++++++++++++++++++++++++++++++++++++ gulp/tasks/html.js | 2 +- lib/forcegraph/draw.js | 15 +++------- lib/gui.js | 2 +- lib/map.js | 4 +-- lib/map/labellayer.js | 6 ++-- lib/map/locationmarker.js | 35 ++--------------------- lib/proportions.js | 2 +- lib/utils/helper.js | 6 ++-- 10 files changed, 76 insertions(+), 56 deletions(-) diff --git a/app.js b/app.js index 84316b2..5e6d0b0 100644 --- a/app.js +++ b/app.js @@ -37,7 +37,5 @@ require.config({ }); require(['main'], function (main) { - /** global: config */ - window.config = jsonData; main(); }); diff --git a/config.default.json b/config.default.json index 367aaa0..9ad9529 100644 --- a/config.default.json +++ b/config.default.json @@ -75,6 +75,7 @@ "fr", "ru" ], + // Color configs "icon": { "base": { "fillOpacity": 0.6, @@ -107,5 +108,62 @@ "fillColor": "#93E929" } }, + "client": { + "wifi24": "rgba(220, 0, 103, 0.7)", + "wifi5": "rgba(10, 156, 146, 0.7)", + "other": "rgba(227, 166, 25, 0.7)" + }, + "map": { + "labelNewColor": "#459c18", + "tqFrom": "#F02311", + "tqTo": "#04C714", + "highlightNode": { + "color": "#ad2358", + "weight": 8, + "fillOpacity": 1, + "opacity": 0.4, + "className": "stroke-first" + }, + "highlightLink": { + "weight": 4, + "opacity": 1, + "dashArray": "5, 10" + } + }, + "forceGraph": { + "nodeColor": "#fff", + "highlightColor": "rgba(255, 255, 255, 0.2)", + "labelColor": "#fff", + "tqFrom": "#770038", + "tqTo": "#dc0067" + }, + "locate": { + "outerCircle": { + "stroke": false, + "color": "#4285F4", + "opacity": 1, + "fillOpacity": 0.3, + "clickable": false, + "radius": 16 + }, + "innerCircle": { + "stroke:": true, + "color": "#ffffff", + "fillColor": "#4285F4", + "weight": 1.5, + "clickable": false, + "opacity": 1, + "fillOpacity": 1, + "radius": 7 + }, + "accuracyCircle": { + "stroke": true, + "color": "#4285F4", + "weight": 1, + "clickable": false, + "opacity": 0.7, + "fillOpacity": 0.2 + } + }, "cacheBreaker": "" } diff --git a/gulp/tasks/html.js b/gulp/tasks/html.js index 5c56e72..2c1aa0e 100644 --- a/gulp/tasks/html.js +++ b/gulp/tasks/html.js @@ -10,7 +10,7 @@ module.exports = function (gulp, plugins, config, env) { JSON.parse(JSON.minify(defaultConfig)), JSON.parse(JSON.minify(customConfig.contents.toString('utf8'))) ); - return '