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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
e32bc4a6
Commit
e32bc4a6
authored
Sep 15, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX]
#205
GraphExplorer, still needs to lower the loader when recomputing (TODO)
parent
162bd7ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
53 deletions
+57
-53
GraphExplorer.purs
src/Gargantext/Components/GraphExplorer.purs
+42
-38
Controls.purs
src/Gargantext/Components/GraphExplorer/Controls.purs
+1
-1
Types.purs
src/Gargantext/Components/GraphExplorer/Types.purs
+14
-14
No files found.
src/Gargantext/Components/GraphExplorer.purs
View file @
e32bc4a6
...
...
@@ -49,8 +49,8 @@ type LayoutProps =
, showLogin :: R.State Boolean
)
type Props =
(
graph
:: SigmaxT.SGraph
type Props =
( graph
:: SigmaxT.SGraph
, graphVersion :: R.State Int
, hyperdataGraph :: GET.HyperdataGraph
, mMetaData :: Maybe GET.MetaData
...
...
@@ -66,7 +66,6 @@ explorerLayoutCpt = R2.hooksComponent thisModule "explorerLayout" cpt
where
cpt props _ = do
graphVersion <- R.useState' 0
pure $ explorerLayoutView graphVersion props
explorerLayoutView :: R.State Int -> Record LayoutProps -> R.Element
...
...
@@ -103,7 +102,10 @@ explorerCpt = R2.hooksComponent thisModule "explorer" cpt
} _ = do
let startForceAtlas = maybe true (\(GET.MetaData { startForceAtlas }) -> startForceAtlas) mMetaData
let forceAtlasS = if startForceAtlas then SigmaxT.InitialRunning else SigmaxT.InitialStopped
let forceAtlasS = if startForceAtlas
then SigmaxT.InitialRunning
else SigmaxT.InitialStopped
dataRef <- R.useRef graph
graphRef <- R.useRef null
...
...
@@ -275,8 +277,7 @@ graphViewCpt = R2.hooksComponent thisModule "graphView" cpt
R.useEffect1' (fst controls.multiSelectEnabled) $ do
R.setRef multiSelectEnabledRef $ fst controls.multiSelectEnabled
pure $ Graph.graph {
elRef
pure $ Graph.graph { elRef
, forceAtlas2Settings: Graph.forceAtlas2Settings
, graph
, mCamera
...
...
@@ -344,7 +345,10 @@ modeGraphType Types.Terms = "def"
getNodes :: Session -> R.State Int -> GET.GraphId -> Aff GET.HyperdataGraph
getNodes session (graphVersion /\ _) graphId = get session $ NodeAPI Types.Graph (Just graphId) ("?version=" <> show graphVersion)
getNodes session (graphVersion /\ _) graphId =
get session $ NodeAPI Types.Graph
(Just graphId)
("?version=" <> show graphVersion)
transformGraph :: Record Controls.Controls -> SigmaxT.SGraph -> SigmaxT.SGraph
...
...
src/Gargantext/Components/GraphExplorer/Controls.purs
View file @
e32bc4a6
...
...
@@ -109,7 +109,7 @@ controlsCpt = R2.hooksComponent thisModule "controls" cpt
-- CPU, has memory leaks etc.
R.useEffect1' (fst props.forceAtlasState) $ do
if (fst props.forceAtlasState) == SigmaxT.InitialRunning then do
timeoutId <- setTimeout
2
000 $ do
timeoutId <- setTimeout
9
000 $ do
let (toggled /\ setToggled) = props.forceAtlasState
case toggled of
SigmaxT.InitialRunning -> setToggled $ const SigmaxT.Paused
...
...
src/Gargantext/Components/GraphExplorer/Types.purs
View file @
e32bc4a6
...
...
@@ -286,8 +286,8 @@ instance showSideTab :: Show SideTab where
show SideTabCommunity = "Community"
newtype Camera =
Camera {
ratio :: Number
newtype Camera =
Camera {
ratio :: Number
, x :: Number
, y :: Number
}
...
...
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