diff options
| author | julian laplace <julescarbon@gmail.com> | 2022-10-28 14:31:14 +0200 |
|---|---|---|
| committer | julian laplace <julescarbon@gmail.com> | 2022-10-28 14:31:14 +0200 |
| commit | 7f108d69c088db18af78c8ff4553426cd393cc66 (patch) | |
| tree | 97033d3d276fae73f10f93673891c09bc8e53a66 /public/assets/js/util/format.js | |
| parent | 1f34f05a9ff060d4f897f1df42bc07c997949471 (diff) | |
keywords
Diffstat (limited to 'public/assets/js/util/format.js')
| -rw-r--r-- | public/assets/js/util/format.js | 9 |
1 files changed, 9 insertions, 0 deletions
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 |
