Commit 097e80d8 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[Graph] refresh sigma after settings are set

Also, fix label size to be "fixed".
parent 4c0bca05
......@@ -153,7 +153,7 @@ sigmaSettings =
, defaultHoverLabelBGColor: "#fff"
, defaultHoverLabelColor: "#000"
, defaultLabelColor: "#000" -- labels text color
, defaultLabelSize: 3.0 -- (old tina: showLabelsIfZoom)
, defaultLabelSize: 14.0 -- (old tina: showLabelsIfZoom)
, defaultNodeBorderColor: "black" -- <- if nodeBorderColor = 'default'
, defaultNodeColor: "#ddd"
, drawEdgeLabels: true
......@@ -165,12 +165,12 @@ sigmaSettings =
, font: "Droid Sans" -- font params
, fontStyle: "bold"
, hideEdgesOnMove: true
, labelSize : "proportional"
, labelSize : "fixed"
, labelSizeRatio: 2.0 -- label size in ratio of node size
, labelThreshold: 2.0 -- min node cam size to start showing label
, maxEdgeSize: 0.0
, maxEdgeSize: 1.0
, maxNodeSize: 30.0
, minEdgeSize: 0.0 -- in fact used in tina as edge size
, minEdgeSize: 1.0 -- in fact used in tina as edge size
, minNodeSize: 5.0
, mouseEnabled: true
, mouseZoomDuration: 150.0
......
......@@ -61,8 +61,8 @@ labelSizeButton sigmaRef state =
sizeButton {
state: state
, caption: "Label Size"
, min: 1.0
, max: 4.0
, min: 5.0
, max: 30.0
, onChange: \e -> do
let mSigma = Sigmax.readSigma <$> R.readRef sigmaRef
let newValue = readFloat $ R2.unsafeEventValue e
......
......@@ -97,7 +97,9 @@ bind_ s e h = runEffectFn3 _bind s e (mkEffectFn1 h)
foreign import _bind :: forall e. EffectFn3 Sigma String (EffectFn1 e Unit) Unit
setSettings :: forall settings. Sigma -> settings -> Effect Unit
setSettings = runEffectFn2 _setSettings
setSettings sigma settings = do
runEffectFn2 _setSettings sigma settings
refresh sigma
foreign import _setSettings :: forall settings. EffectFn2 Sigma settings Unit
......
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