From 7f108d69c088db18af78c8ff4553426cd393cc66 Mon Sep 17 00:00:00 2001 From: julian laplace Date: Fri, 28 Oct 2022 14:31:14 +0200 Subject: keywords --- public/assets/js/util/format.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'public/assets/js/util/format.js') diff --git a/public/assets/js/util/format.js b/public/assets/js/util/format.js index 422a4c6..41d652a 100644 --- a/public/assets/js/util/format.js +++ b/public/assets/js/util/format.js @@ -286,6 +286,15 @@ const size_scale = [ function get_size_opacity(n) { return get_scale_opacity(n, size_scale); } +const views_scale = [ + [0, 0.5], + [100, 0.8], + [1000, 0.9], + [10000, 1.0], +]; +function get_views_opacity(n) { + return get_scale_opacity(n, views_scale); +} /** * find a value on one axis of an array of points, and return the proportional point * @param {Array} value a value, to be matched on the first column of scale -- cgit v1.2.3-70-g09d2