Commit d1943fdf authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge branch '354-dev-graph-screenshot-fix' of...

Merge branch '354-dev-graph-screenshot-fix' of ssh://gitlab.iscpif.fr:20022/gargantext/purescript-gargantext into dev-merge
parents b3e1efd5 a0efc70b
...@@ -2,6 +2,7 @@ module Gargantext.Components.GraphExplorer where ...@@ -2,6 +2,7 @@ module Gargantext.Components.GraphExplorer where
import Gargantext.Prelude hiding (max, min) import Gargantext.Prelude hiding (max, min)
import Control.Bind ((=<<))
import DOM.Simple.Types (Element) import DOM.Simple.Types (Element)
import Data.Array as A import Data.Array as A
import Data.Either (Either) import Data.Either (Either)
...@@ -22,6 +23,7 @@ import Gargantext.Components.GraphExplorer.Types as GET ...@@ -22,6 +23,7 @@ import Gargantext.Components.GraphExplorer.Types as GET
import Gargantext.Config.REST (RESTError, logRESTError) import Gargantext.Config.REST (RESTError, logRESTError)
import Gargantext.Data.Louvain as Louvain import Gargantext.Data.Louvain as Louvain
import Gargantext.Hooks.Loader (useLoader) import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Hooks.Sigmax.Sigma (startForceAtlas2)
import Gargantext.Hooks.Sigmax.Types as SigmaxT import Gargantext.Hooks.Sigmax.Types as SigmaxT
import Gargantext.Routes (SessionRoute(NodeAPI)) import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Sessions (Session, get) import Gargantext.Sessions (Session, get)
...@@ -60,7 +62,19 @@ type GraphWriteProps = ...@@ -60,7 +62,19 @@ type GraphWriteProps =
| Props | Props
) )
type LayoutWithKeyProps =
( key :: String
| LayoutProps )
-------------------------------------------------------------- --------------------------------------------------------------
explorerLayoutWithKey :: R2.Component LayoutWithKeyProps
explorerLayoutWithKey = R.createElement explorerLayoutWithKeyCpt
explorerLayoutWithKeyCpt :: R.Component LayoutWithKeyProps
explorerLayoutWithKeyCpt = here.component "explorerLayoutWithKey" cpt where
cpt { boxes, graphId, session } _ = do
pure $ explorerLayout { boxes, graphId, session } []
explorerLayout :: R2.Component LayoutProps explorerLayout :: R2.Component LayoutProps
explorerLayout = R.createElement explorerLayoutCpt explorerLayout = R.createElement explorerLayoutCpt
explorerLayoutCpt :: R.Component LayoutProps explorerLayoutCpt :: R.Component LayoutProps
......
...@@ -427,9 +427,13 @@ graphExplorerCpt = here.component "graphExplorer" cpt where ...@@ -427,9 +427,13 @@ graphExplorerCpt = here.component "graphExplorer" cpt where
, nodeId } _ = do , nodeId } _ = do
let sessionProps = RE.pick props :: Record SessionProps let sessionProps = RE.pick props :: Record SessionProps
pure $ authed (Record.merge { content: \session -> pure $ authed (Record.merge { content: \session ->
GraphExplorer.explorerLayout { boxes GraphExplorer.explorerLayoutWithKey { boxes
, graphId: nodeId , graphId: nodeId
, session } [] } sessionProps) [] , key: "graphId-" <> show nodeId
, session } [] } sessionProps) []
-- GraphExplorer.explorerLayout { boxes
-- , graphId: nodeId
-- , session } [] } sessionProps) []
phyloExplorer :: R2.Component SessionNodeProps phyloExplorer :: R2.Component SessionNodeProps
phyloExplorer = R.createElement phyloExplorerCpt phyloExplorer = R.createElement phyloExplorerCpt
phyloExplorerCpt :: R.Component SessionNodeProps phyloExplorerCpt :: R.Component SessionNodeProps
......
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