(compute-positions causal-order branches commits)
Compute x-y positions from given causal-order branches and commits of a repo. The resulting positions are relative to a given screen width and height.
Example: (def causal-order {10 [] 20 [10]}) (def commits {10 :master 20 :master}) (def branches {:master #{20}}) (compute-positions causal-order branches commits)
=> {:branches [[:master 20]] :links ([10 20 :master]) :nodes [[10 :master] [20 :master]] :x-order (:master) :x-positions {10 0.05, 20 0.95} :y-positions {10 1/2, 20 1/2}}
Compute x-y positions from given causal-order branches and commits of a repo. The resulting positions are relative to a given screen width and height. Example: (def causal-order {10 [] 20 [10]}) (def commits {10 :master 20 :master}) (def branches {:master #{20}}) (compute-positions causal-order branches commits) => {:branches [[:master 20]] :links ([10 20 :master]) :nodes [[10 :master] [20 :master]] :x-order (:master) :x-positions {10 0.05, 20 0.95} :y-positions {10 1/2, 20 1/2}}
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close