Commit 96be222a authored by arturo's avatar arturo

>>> continue

parent ffa21aa2
Pipeline #2071 failed with stage
exports._drawPhylo = drawPhylo;
exports._highlightSource = highlightSource;
exports._unhide = unhide;
// (from "index.html" scripts)
function unhide(name) {
document.getElementById("phyloName").innerHTML = name;
document.getElementById("phyloName").style.visibility = "visible";
document.getElementById("reset").style.visibility = "visible";
document.getElementById("label").style.visibility = "visible";
document.getElementById("heading").style.visibility = "visible";
document.getElementById("export").style.visibility = "visible";
}
// set javascript date from a string year
function yearToDate(year) {
......
......@@ -12,9 +12,10 @@ import Data.Foldable (for_)
import Data.FoldableWithIndex (forWithIndex_)
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn7, runEffectFn1, runEffectFn7)
import Effect.Uncurried (EffectFn7, runEffectFn7)
import FFI.Simple (applyTo, (..), (.=), (.?))
import Gargantext.Components.PhyloExplorer.Types (AncestorLink, Branch, BranchLink, GlobalTerm(..), Group(..), Link, Period, PhyloDataSet(..))
import Gargantext.Utils.Reactix (getElementById)
import Graphics.D3.Base (D3)
foreign import _drawPhylo :: EffectFn7
......@@ -47,14 +48,6 @@ highlightSource = _highlightSource
-----------------------------------------------------------
-- @WIP: still necessary? as we certainly would have only one mode?
foreign import _unhide :: EffectFn1 String Unit
unhide :: String -> Effect Unit
unhide = runEffectFn1 _unhide
-----------------------------------------------------------
setGlobalDependencies :: Window -> PhyloDataSet -> Effect Unit
setGlobalDependencies w (PhyloDataSet o)
= do
......@@ -107,3 +100,18 @@ setGlobalDependencies w (PhyloDataSet o)
setGlobalD3Reference :: Window -> D3 -> Effect Unit
setGlobalD3Reference window d3 = void $ pure $ (window .= "d3") d3
-----------------------------------------------------------
unhide :: String -> Effect Unit
unhide name = pure unit
<* setText "phyloName" name
<* turnVisible "phyloName"
<* turnVisible "reset"
<* turnVisible "label"
<* turnVisible "heading"
where
setText id n = getElementById id >>= \el -> pure $ (el .= "innerHTML") n
turnVisible id = getElementById id >>= \el -> pure $ (el .= "visibility")
"visible"
......@@ -420,13 +420,13 @@ i.how:hover span {
fill: #f8381f;
}
.term-unfocus {
/*fill: #A9A9A9;*/
}
// .term-unfocus {
// fill: #A9A9A9;
// }
.term-focus {
/*fill: black;*/
}
// .term-focus {
// fill: black;
// }
.term-path {
fill: none;
......
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