Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
0e8a6162
Commit
0e8a6162
authored
Apr 27, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph explorer] fix to node selection (tab data selected)
parent
bf231ed5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
Controls.purs
src/Gargantext/Components/GraphExplorer/Controls.purs
+7
-4
Router.purs
src/Gargantext/Components/Router.purs
+0
-7
No files found.
src/Gargantext/Components/GraphExplorer/Controls.purs
View file @
0e8a6162
...
...
@@ -10,7 +10,6 @@ import Data.Int as I
import Data.Maybe (Maybe(..), maybe)
import Data.Sequence as Seq
import Data.Set as Set
import Effect (Effect)
import Effect.Timer (setTimeout)
import Prelude
import Reactix as R
...
...
@@ -52,8 +51,9 @@ type Controls =
, showControls :: T.Box Boolean
, showEdges :: T.Box SigmaxT.ShowEdgesState
, showLouvain :: T.Box Boolean
, sidePanelState :: T.Box GT.SidePanelState
, showTree :: T.Box Boolean
, sidePanelState :: T.Box GT.SidePanelState
, sideTab :: T.Box GET.SideTab
, sigmaRef :: R.Ref Sigmax.Sigma
)
...
...
@@ -88,6 +88,7 @@ controlsCpt = here.component "controls" cpt
, showLouvain
, showTree
, sidePanelState
, sideTab
, sigmaRef } _ = do
forceAtlasState' <- T.useLive T.unequal forceAtlasState
graphStage' <- T.useLive T.unequal graphStage
...
...
@@ -116,8 +117,9 @@ controlsCpt = here.component "controls" cpt
-- Automatic opening of sidebar when a node is selected (but only first time).
R.useEffect' $ do
if sidePanelState' == GT.InitialClosed && (not Set.isEmpty selectedNodeIds') then
if sidePanelState' == GT.InitialClosed && (not Set.isEmpty selectedNodeIds') then
do
T.write_ GT.Opened sidePanelState
T.write_ GET.SideTabData sideTab
else
pure unit
...
...
@@ -255,7 +257,7 @@ useGraphControls { forceAtlasS
sigma <- Sigmax.initSigma
sigmaRef <- R.useRef sigma
{ multiSelectEnabled, removedNodeIds, selectedNodeIds, showControls } <- GEST.focusedSidePanel sidePanel
{ multiSelectEnabled, removedNodeIds, selectedNodeIds, showControls
, sideTab
} <- GEST.focusedSidePanel sidePanel
pure { edgeConfluence
, edgeWeight
...
...
@@ -274,6 +276,7 @@ useGraphControls { forceAtlasS
, showLouvain
, sidePanelState
, showTree
, sideTab
, sigmaRef
, reloadForest
}
src/Gargantext/Components/Router.purs
View file @
0e8a6162
...
...
@@ -195,9 +195,6 @@ sidePanelCpt = here.component "sidePanel" cpt where
sidePanelState' <- T.useLive T.unequal sidePanelState
session' <- T.useLive T.unequal session
R.useEffect' $ do
here.log2 "sidePanel session" session'
case session' of
Nothing -> pure $ H.div {} []
Just s ->
...
...
@@ -233,10 +230,6 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
, sidePanel: sidePanelLists
, sidePanelState } [] ]
GR.PGraphExplorer s g -> do
R.useEffect' $ do
here.log2 "mGraph" mGraph'
here.log2 "mGraphMetaData" mGraphMetaData'
case (mGraph' /\ mGraphMetaData') of
(Nothing /\ _) -> pure $ wrapper []
(_ /\ Nothing) -> pure $ wrapper []
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment