Commit 61a19df3 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into dev-warnings-cleanup

parents f794707a 5e03363b
......@@ -215,7 +215,7 @@ sigmaSettings =
, drawEdges: true
, drawLabels: true
, drawNodes: true
, enableEdgeHovering: true
, enableEdgeHovering: false
, edgeHoverExtremities: true
, edgeHoverColor: "edge"
, edgeHoverPrecision: 2.0
......@@ -226,11 +226,11 @@ sigmaSettings =
, hideEdgesOnMove: true
, labelSize : "fixed"
, labelSizeRatio: 1.0 -- label size in ratio of node size
, labelThreshold: 1.0 -- min node cam size to start showing label
, maxEdgeSize: 2.0
, maxNodeSize: 10.0
, labelThreshold: 5.0 -- min node cam size to start showing label
, maxEdgeSize: 1.0
, maxNodeSize: 7.0
, minEdgeSize: 0.5 -- in fact used in tina as edge size
, minNodeSize: 5.0
, minNodeSize: 0.1
, mouseEnabled: true
, mouseZoomDuration: 150.0
, nodeBorderColor: "node" -- choices: 'default' color vs. node color
......
......@@ -17,6 +17,7 @@ import DOM.Simple.Types (Element)
import Effect.Aff (Aff)
import Reactix as R
import Reactix.DOM.HTML as RH
import Math (log)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Sigmax (Sigma)
......@@ -207,7 +208,7 @@ convert (GET.GraphData r) = Tuple r.metaData $ SigmaxTypes.Graph {nodes, edges}
nodeFn i (GET.Node n) =
Seq.singleton
{ id : n.id_
, size : toNumber n.size
, size : log (toNumber n.size + 1.0)
, label : n.label
, x : n.x -- cos (toNumber i)
, y : n.y -- sin (toNumber i)
......
......@@ -62,6 +62,7 @@ newtype MetaData = MetaData
, legend :: Array Legend
, corpusId :: Array Int
, listId :: ListId
, version :: Int
}
getLegend :: GraphData -> Maybe (Array Legend)
......@@ -97,7 +98,7 @@ initialGraphData = GraphData {
nodes: []
, edges: []
, sides: []
, metaData : Just $ MetaData {title : "", legend : [], corpusId : [], listId : 0}
, metaData : Just $ MetaData {title : "", legend : [], corpusId : [], listId : 0, version : 0}
}
instance decodeJsonGraphData :: DecodeJson GraphData where
......@@ -134,7 +135,8 @@ instance decodeJsonMetaData :: DecodeJson MetaData where
legend <- obj .: "legend"
corpusId <- obj .: "corpusId"
listId <- obj .: "listId"
pure $ MetaData { title, legend, corpusId, listId}
version <- obj .: "version"
pure $ MetaData { title, legend, corpusId, listId, version}
instance decodeJsonLegend :: DecodeJson Legend where
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment