Commit f07cc33d authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[graph] selector size, related terms, scaling of related terms

parent fcdaa46e
...@@ -509,7 +509,7 @@ neighborhoodCpt = R.memo' $ here.component "neighborhood" cpt where ...@@ -509,7 +509,7 @@ neighborhoodCpt = R.memo' $ here.component "neighborhood" cpt where
[ "text-info", "d-inline" ] $ [ "text-info", "d-inline" ] $
show termCount show termCount
, ,
H.text $ nbsp 1 <> "terms" H.text $ nbsp 1 <> "related terms"
, ,
-- Expand word cloud -- Expand word cloud
B.iconButton B.iconButton
...@@ -643,11 +643,12 @@ updateTermButtonCpt = here.component "updateTermButton" cpt where ...@@ -643,11 +643,12 @@ updateTermButtonCpt = here.component "updateTermButton" cpt where
badgeSize :: Number -> Number -> Number -> String badgeSize :: Number -> Number -> Number -> String
badgeSize minSize maxSize size = badgeSize minSize maxSize size =
let let
minFontSize = 10.0 minFontSize = 7.0
maxFontSize = 24.0 maxFontSize = 28.0
sizeScaled = (size - minSize) / (maxSize - minSize) -- in [0; 1] range sizeScaled = (size - minSize) / (maxSize - minSize) -- in [0; 1] range
scale' = DN.log (sizeScaled + 1.0) / (DN.log 2.0) -- in [0; 1] range --scale' = DN.log (sizeScaled + 1.0) / (DN.log 2.0) -- in [0; 1] range
scale = minFontSize + scale' * (maxFontSize - minFontSize) --scale = minFontSize + scale' * (maxFontSize - minFontSize)
scale = minFontSize + sizeScaled * (maxFontSize - minFontSize)
in in
show scale <> "px" show scale <> "px"
......
...@@ -145,7 +145,7 @@ mouseSelectorSizeSliderCpt = here.component "mouseSelectorSizeSlider" cpt ...@@ -145,7 +145,7 @@ mouseSelectorSizeSliderCpt = here.component "mouseSelectorSizeSlider" cpt
caption: "Selector size (Shift + wheel)" caption: "Selector size (Shift + wheel)"
, forceAtlasState , forceAtlasState
, min: 1.0 , min: 1.0
, max: 50.0 , max: 100.0
, onChange: \e -> do , onChange: \e -> do
let sigma = R.readRef sigmaRef let sigma = R.readRef sigmaRef
let newValue' = DN.fromString $ R.unsafeEventValue e let newValue' = DN.fromString $ R.unsafeEventValue e
......
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