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
a4a24fc8
Commit
a4a24fc8
authored
Dec 21, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Graph] selectorSize: remove unused code
parent
d1a1e6ec
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
27 deletions
+6
-27
Graph.purs
src/Gargantext/Components/Graph.purs
+1
-6
GraphExplorer.purs
src/Gargantext/Components/GraphExplorer.purs
+0
-1
Controls.purs
src/Gargantext/Components/GraphExplorer/Controls.purs
+1
-4
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+4
-3
Monad.purs
src/Gargantext/Utils/Monad.purs
+0
-13
No files found.
src/Gargantext/Components/Graph.purs
View file @
a4a24fc8
...
@@ -30,7 +30,6 @@ type Props sigma forceatlas2 =
...
@@ -30,7 +30,6 @@ type Props sigma forceatlas2 =
, graph :: SigmaxTypes.SGraph
, graph :: SigmaxTypes.SGraph
, multiSelectEnabledRef :: R.Ref Boolean
, multiSelectEnabledRef :: R.Ref Boolean
, selectedNodeIds :: R.State SigmaxTypes.SelectedNodeIds
, selectedNodeIds :: R.State SigmaxTypes.SelectedNodeIds
, selectorSize :: R.State Int
, showEdges :: R.State SigmaxTypes.ShowEdgesState
, showEdges :: R.State SigmaxTypes.ShowEdgesState
, sigmaRef :: R.Ref Sigmax.Sigma
, sigmaRef :: R.Ref Sigmax.Sigma
, sigmaSettings :: sigma
, sigmaSettings :: sigma
...
@@ -104,10 +103,6 @@ graphCpt = R.hooksComponent "Graph" cpt
...
@@ -104,10 +103,6 @@ graphCpt = R.hooksComponent "Graph" cpt
Sigmax.updateNodes sigma tNodesMap
Sigmax.updateNodes sigma tNodesMap
Sigmax.setEdges sigma (not $ SigmaxTypes.edgeStateHidden showEdges)
Sigmax.setEdges sigma (not $ SigmaxTypes.edgeStateHidden showEdges)
-- R.useEffect1' (fst props.selectorSize) $ do
-- Sigmax.dependOnSigma (R.readRef sigmaRef) "[graphCpt (Ready)] no sigma" $ \sigma -> do
-- Sigmax.selectorWithSize sigma $ fst props.selectorSize
stageHooks _ = pure unit
stageHooks _ = pure unit
...
@@ -241,7 +236,7 @@ sigmaSettings =
...
@@ -241,7 +236,7 @@ sigmaSettings =
, minEdgeSize: 0.5 -- in fact used in tina as edge size
, minEdgeSize: 0.5 -- in fact used in tina as edge size
, minNodeSize: 1.0
, minNodeSize: 1.0
, mouseEnabled: true
, mouseEnabled: true
, mouseSelectorSize: 1
0
.0
, mouseSelectorSize: 1
5
.0
, mouseZoomDuration: 150.0
, mouseZoomDuration: 150.0
, nodeBorderColor: "default" -- choices: "default" color vs. "node" color
, nodeBorderColor: "default" -- choices: "default" color vs. "node" color
--, nodesPowRatio : 10.8
--, nodesPowRatio : 10.8
...
...
src/Gargantext/Components/GraphExplorer.purs
View file @
a4a24fc8
...
@@ -189,7 +189,6 @@ graphViewCpt = R.hooksComponent "GraphView" cpt
...
@@ -189,7 +189,6 @@ graphViewCpt = R.hooksComponent "GraphView" cpt
, graph
, graph
, multiSelectEnabledRef
, multiSelectEnabledRef
, selectedNodeIds: controls.selectedNodeIds
, selectedNodeIds: controls.selectedNodeIds
, selectorSize: controls.selectorSize
, showEdges: controls.showEdges
, showEdges: controls.showEdges
, sigmaRef: controls.sigmaRef
, sigmaRef: controls.sigmaRef
, sigmaSettings: Graph.sigmaSettings
, sigmaSettings: Graph.sigmaSettings
...
...
src/Gargantext/Components/GraphExplorer/Controls.purs
View file @
a4a24fc8
...
@@ -43,7 +43,6 @@ type Controls =
...
@@ -43,7 +43,6 @@ type Controls =
, multiSelectEnabled :: R.State Boolean
, multiSelectEnabled :: R.State Boolean
, nodeSize :: R.State Range.NumberRange
, nodeSize :: R.State Range.NumberRange
, selectedNodeIds :: R.State SigmaxTypes.SelectedNodeIds
, selectedNodeIds :: R.State SigmaxTypes.SelectedNodeIds
, selectorSize :: R.State Int
, showControls :: R.State Boolean
, showControls :: R.State Boolean
, showEdges :: R.State SigmaxTypes.ShowEdgesState
, showEdges :: R.State SigmaxTypes.ShowEdgesState
, showSidePanel :: R.State GET.SidePanelState
, showSidePanel :: R.State GET.SidePanelState
...
@@ -62,7 +61,7 @@ type LocalControls =
...
@@ -62,7 +61,7 @@ type LocalControls =
initialLocalControls :: R.Hooks (Record LocalControls)
initialLocalControls :: R.Hooks (Record LocalControls)
initialLocalControls = do
initialLocalControls = do
labelSize <- R.useState' 14.0
labelSize <- R.useState' 14.0
mouseSelectorSize <- R.useState' 1
0
.0
mouseSelectorSize <- R.useState' 1
5
.0
pure $ {
pure $ {
labelSize
labelSize
...
@@ -172,7 +171,6 @@ useGraphControls graph = do
...
@@ -172,7 +171,6 @@ useGraphControls graph = do
nodeSize <- R.useState' $ Range.Closed { min: 0.0, max: 100.0 }
nodeSize <- R.useState' $ Range.Closed { min: 0.0, max: 100.0 }
showTree <- R.useState' false
showTree <- R.useState' false
selectedNodeIds <- R.useState' $ Set.empty
selectedNodeIds <- R.useState' $ Set.empty
selectorSize <- R.useState' 15
showControls <- R.useState' false
showControls <- R.useState' false
showEdges <- R.useState' SigmaxTypes.EShow
showEdges <- R.useState' SigmaxTypes.EShow
showSidePanel <- R.useState' GET.InitialClosed
showSidePanel <- R.useState' GET.InitialClosed
...
@@ -188,7 +186,6 @@ useGraphControls graph = do
...
@@ -188,7 +186,6 @@ useGraphControls graph = do
, multiSelectEnabled
, multiSelectEnabled
, nodeSize
, nodeSize
, selectedNodeIds
, selectedNodeIds
, selectorSize
, showControls
, showControls
, showEdges
, showEdges
, showSidePanel
, showSidePanel
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
a4a24fc8
...
@@ -9,6 +9,7 @@ import Data.Map as Map
...
@@ -9,6 +9,7 @@ import Data.Map as Map
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..))
import Data.Sequence as Seq
import Data.Sequence as Seq
import Data.Set as Set
import Data.Set as Set
import Data.Traversable (traverse)
import Data.Tuple.Nested((/\))
import Data.Tuple.Nested((/\))
import DOM.Simple.Console (log2)
import DOM.Simple.Console (log2)
import Effect (Effect)
import Effect (Effect)
...
@@ -25,7 +26,6 @@ import Gargantext.Hooks.Sigmax.Types as SigmaxTypes
...
@@ -25,7 +26,6 @@ import Gargantext.Hooks.Sigmax.Types as SigmaxTypes
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Routes (SessionRoute(NodeAPI))
import Gargantext.Sessions (Session, delete)
import Gargantext.Sessions (Session, delete)
import Gargantext.Types (NodeType(..))
import Gargantext.Types (NodeType(..))
import Gargantext.Utils.Monad (mapM_)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
type Props =
type Props =
...
@@ -125,8 +125,9 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
...
@@ -125,8 +125,9 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
deleteNodes session nodeIds
deleteNodes session nodeIds
deleteNodes :: Session -> Array Int -> Effect Unit
deleteNodes :: Session -> Array Int -> Effect Unit
deleteNodes session nodeIds =
deleteNodes session nodeIds = do
mapM_ (launchAff_ <<< deleteNode session) nodeIds
_ <- traverse (launchAff_ <<< deleteNode session) nodeIds
pure unit
deleteNode :: Session -> Int -> Aff Int
deleteNode :: Session -> Int -> Aff Int
deleteNode session nodeId = delete session $ NodeAPI Node (Just nodeId) ""
deleteNode session nodeId = delete session $ NodeAPI Node (Just nodeId) ""
...
...
src/Gargantext/Utils/Monad.purs
deleted
100644 → 0
View file @
d1a1e6ec
module Gargantext.Utils.Monad where
import Prelude (unit, pure, Unit, (<<<))
import Control.Monad (class Monad, (>>=))
import Data.Foldable (class Foldable, foldr)
bind_ :: forall a b m. Monad m => m a -> m b -> m b
bind_ m k = m >>= \_ -> k -- See Note [Recursive bindings for Applicative/Monad]
infixr 1 bind_ as >>
mapM_ :: forall a b t m. Foldable t => Monad m => (a -> m b) -> t a -> m Unit
mapM_ f = foldr ((>>) <<< f) (pure unit)
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