mirror of https://github.com/logseq/logseq
Graph: Use a smoother scale function
The scaling is pretty much the same - it just gets rid of some stackiness caused by the `<` etc. conditions in previous code.pull/3518/head
parent
b1b8405217
commit
1b7bfd6511
|
@ -40,13 +40,7 @@
|
|||
(if dark? "orange" "green")
|
||||
color)]
|
||||
(let [n (get page-links p 1)
|
||||
size-v (if (> n 2)
|
||||
(js/Math.cbrt n)
|
||||
n)
|
||||
size-v (if (< size-v 1)
|
||||
1
|
||||
(int size-v))
|
||||
size (* size-v 8)]
|
||||
size (int (* 8 (max 1.0 (js/Math.cbrt n))))]
|
||||
(cond->
|
||||
{:id p
|
||||
:label p
|
||||
|
|
Loading…
Reference in New Issue