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
a54ded1c
Commit
a54ded1c
authored
2 years ago
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph] center button disable when fa2 running
parent
ce88d2c0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
Buttons.purs
src/Gargantext/Components/GraphExplorer/Toolbar/Buttons.purs
+21
-11
Controls.purs
...Gargantext/Components/GraphExplorer/Toolbar/Controls.purs
+2
-1
No files found.
src/Gargantext/Components/GraphExplorer/Toolbar/Buttons.purs
View file @
a54ded1c
...
...
@@ -47,13 +47,23 @@ here = R2.here "Gargantext.Components.GraphExplorer.Toolbar.Button"
------------------------------------------------------
centerButton :: R.Ref Sigmax.Sigma -> R.Element
centerButton sigmaRef = B.button
{ variant: OutlinedButtonVariant Secondary
, callback: \_ -> do
let sigma = R.readRef sigmaRef
Sigmax.dependOnSigma sigma "[centerButton] sigma: Nothing" $ \s ->
type CenterButtonProps =
( forceAtlasState :: SigmaxTypes.ForceAtlasState
, sigmaRef :: R.Ref Sigmax.Sigma )
centerButton :: R2.Leaf CenterButtonProps
centerButton = R2.leaf centerButtonCpt
centerButtonCpt :: R.Component CenterButtonProps
centerButtonCpt = here.component "centerButton" cpt
where
cpt { forceAtlasState
, sigmaRef } _ = do
pure $ B.button
{ callback: \_ -> do
Sigmax.dependOnSigma (R.readRef sigmaRef) "[centerButton] sigma: Nothing" $ \s ->
Camera.updateCamera (Camera.camera s) Camera.defaultCamera
, status: SigmaxTypes.forceAtlasComponentStatus forceAtlasState
, variant: OutlinedButtonVariant Secondary
}
[ H.text "Center" ]
...
...
@@ -238,7 +248,7 @@ resetForceAtlasButtonCpt = here.component "resetForceAtlasToggleButton" cpt
onClick forceAtlasState sigmaRef _ = do
-- TODO Sigma.killForceAtlas2 sigma
-- startForceAtlas2 sigma
Sigmax.dependOnSigma (R.readRef sigmaRef) "[resetForceAtlasButton] no sigma" $ \sigma -> do
Sigmax.dependOnSigma (R.readRef sigmaRef) "[resetForceAtlasButton] no sigma" $ \
_
sigma -> do
-- TODO Use fa2Ref instead of sigmaRef
--Sigma.killForceAtlas2 sigma
--Sigma.refreshForceAtlas sigma Graph.forceAtlas2Settings
...
...
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/GraphExplorer/Toolbar/Controls.purs
View file @
a54ded1c
...
...
@@ -198,7 +198,8 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
, titleSlot: H.text "View settings"
}
[
centerButton sigmaRef
centerButton { forceAtlasState: forceAtlasState'
, sigmaRef }
,
gap
,
...
...
This diff is collapsed.
Click to expand it.
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