mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
adjust defaults for better graph building
This commit is contained in:
committed by
Tienson Qin
parent
2ee5a3f43b
commit
2001b6fca5
@@ -547,7 +547,7 @@
|
||||
(defonce *builtin-pages? (atom nil))
|
||||
(defonce *excluded-pages? (atom true))
|
||||
(defonce *show-journals-in-page-graph? (atom nil))
|
||||
(defonce *link-dist (atom 180))
|
||||
(defonce *link-dist (atom 75))
|
||||
|
||||
(rum/defc ^:large-vars/cleanup-todo graph-filters < rum/reactive
|
||||
[graph settings forcesettings n-hops]
|
||||
@@ -708,16 +708,17 @@
|
||||
(ui/slider link-dist
|
||||
{:min 5
|
||||
:max 180
|
||||
:on-change #(reset! *link-dist (int %))}))]
|
||||
;; :on-change #(let [value (util/evalue %)]
|
||||
;; (set-setting! :link-dist value))}))]
|
||||
;; :on-change #(reset! *link-dist (int %))}))]
|
||||
:on-change #(let [value (int %)]
|
||||
(reset! *link-dist value)
|
||||
(set-forcesetting! :link-dist value))}))]
|
||||
;; :on-change #(let [value (util/evalue %)]
|
||||
;; (reset! *link-dist value)
|
||||
;; (set-forcesetting! :link-dist value))}))]
|
||||
|
||||
[:a.opacity-70.opacity-100 {:on-click (fn []
|
||||
(swap! *graph-reset? not)
|
||||
(reset! *link-dist 180))}
|
||||
(reset! *link-dist 75))}
|
||||
"Reset Graph"]]]))
|
||||
{})
|
||||
(graph-filter-section
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
;; The decay factor is akin to atmospheric friction; after the application of any forces during a tick,
|
||||
;; each node’s velocity is multiplied by 1 - decay. As with lowering the alpha decay rate,
|
||||
;; less velocity decay may converge on a better solution, but risks numerical instabilities and oscillation.
|
||||
(.velocityDecay 0.8))
|
||||
(.velocityDecay 0.5))
|
||||
(reset! *simulation simulation)
|
||||
simulation))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user