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
5ba5691b
Commit
5ba5691b
authored
May 20, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph] forceatlas with hidden edges is working now
parent
1a6af8b1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
Controls.purs
src/Gargantext/Components/GraphExplorer/Controls.purs
+3
-2
ToggleButton.purs
src/Gargantext/Components/GraphExplorer/ToggleButton.purs
+4
-4
Types.purs
src/Gargantext/Hooks/Sigmax/Types.purs
+2
-1
No files found.
src/Gargantext/Components/GraphExplorer/Controls.purs
View file @
5ba5691b
...
@@ -111,8 +111,9 @@ controlsCpt = here.component "controls" cpt
...
@@ -111,8 +111,9 @@ controlsCpt = here.component "controls" cpt
R.useEffect' $ Sigmax.handleForceAtlas2Pause sigmaRef forceAtlasState mFAPauseRef Graph.forceAtlas2Settings
R.useEffect' $ Sigmax.handleForceAtlas2Pause sigmaRef forceAtlasState mFAPauseRef Graph.forceAtlas2Settings
-- Handle automatic edge hiding when FA is running (to prevent flickering).
-- Handle automatic edge hiding when FA is running (to prevent flickering).
R.useEffect2' sigmaRef forceAtlasState' $ do
-- TODO Commented temporarily: this breaks forceatlas rendering after reset
T.modify_ (SigmaxT.forceAtlasEdgeState forceAtlasState') showEdges
-- R.useEffect2' sigmaRef forceAtlasState' $ do
-- T.modify_ (SigmaxT.forceAtlasEdgeState forceAtlasState') showEdges
-- Automatic opening of sidebar when a node is selected (but only first time).
-- Automatic opening of sidebar when a node is selected (but only first time).
R.useEffect' $ do
R.useEffect' $ do
...
...
src/Gargantext/Components/GraphExplorer/ToggleButton.purs
View file @
5ba5691b
...
@@ -15,16 +15,15 @@ module Gargantext.Components.GraphExplorer.ToggleButton
...
@@ -15,16 +15,15 @@ module Gargantext.Components.GraphExplorer.ToggleButton
import Prelude
import Prelude
import Effect (Effect)
import Effect (Effect)
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
import Gargantext.Components.Graph as Graph
import Gargantext.Components.Graph as Graph
import Gargantext.Hooks.Sigmax as Sigmax
import Gargantext.Hooks.Sigmax as Sigmax
import Gargantext.Hooks.Sigmax.Sigma as Sigma
import Gargantext.Hooks.Sigmax.Sigma as Sigma
import Gargantext.Hooks.Sigmax.Types as SigmaxTypes
import Gargantext.Hooks.Sigmax.Types as SigmaxTypes
import Gargantext.Types as GT
import Gargantext.Types as GT
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
import Toestand as T
here :: R2.Here
here :: R2.Here
here = R2.here "Gargantext.Components.GraphExplorer.ToggleButton"
here = R2.here "Gargantext.Components.GraphExplorer.ToggleButton"
...
@@ -184,6 +183,7 @@ resetForceAtlasButtonCpt = here.component "resetForceAtlasToggleButton" cpt
...
@@ -184,6 +183,7 @@ resetForceAtlasButtonCpt = here.component "resetForceAtlasToggleButton" cpt
-- startForceAtlas2 sigma
-- startForceAtlas2 sigma
Sigmax.dependOnSigma (R.readRef sigmaRef) "[resetForceAtlasButton] no sigma" $ \sigma -> do
Sigmax.dependOnSigma (R.readRef sigmaRef) "[resetForceAtlasButton] no sigma" $ \sigma -> do
Sigma.killForceAtlas2 sigma
Sigma.killForceAtlas2 sigma
Sigma.refreshForceAtlas sigma Graph.forceAtlas2Settings
T.write_ SigmaxTypes.Killed forceAtlasState
T.write_ SigmaxTypes.Killed forceAtlasState
type TreeToggleButtonProps = (
type TreeToggleButtonProps = (
...
...
src/Gargantext/Hooks/Sigmax/Types.purs
View file @
5ba5691b
...
@@ -168,7 +168,7 @@ toggleForceAtlasState InitialRunning = Paused
...
@@ -168,7 +168,7 @@ toggleForceAtlasState InitialRunning = Paused
toggleForceAtlasState InitialStopped = InitialRunning
toggleForceAtlasState InitialStopped = InitialRunning
toggleForceAtlasState Running = Paused
toggleForceAtlasState Running = Paused
toggleForceAtlasState Paused = Running
toggleForceAtlasState Paused = Running
toggleForceAtlasState Killed = Running
toggleForceAtlasState Killed =
Initial
Running
-- | Custom state for show edges. Normally it is EShow or EHide (show/hide
-- | Custom state for show edges. Normally it is EShow or EHide (show/hide
-- | edges). However, edges are temporarily turned off when forceAtlas is
-- | edges). However, edges are temporarily turned off when forceAtlas is
...
@@ -219,6 +219,7 @@ forceAtlasEdgeState Running EShow = ETempHiddenThenShow
...
@@ -219,6 +219,7 @@ forceAtlasEdgeState Running EShow = ETempHiddenThenShow
forceAtlasEdgeState Running es = es
forceAtlasEdgeState Running es = es
forceAtlasEdgeState Paused ETempHiddenThenShow = EShow
forceAtlasEdgeState Paused ETempHiddenThenShow = EShow
forceAtlasEdgeState Paused es = es
forceAtlasEdgeState Paused es = es
forceAtlasEdgeState Killed ETempHiddenThenShow = EShow
forceAtlasEdgeState Killed es = es
forceAtlasEdgeState Killed es = es
...
...
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