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
84ca8906
Commit
84ca8906
authored
Sep 22, 2022
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[sigma.js] it works, but don't touch the graph or it crashes :)
parent
cee15b12
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
3 deletions
+14
-3
Layout.purs
src/Gargantext/Components/GraphExplorer/Layout.purs
+2
-1
Graphology.purs
src/Gargantext/Hooks/Sigmax/Graphology.purs
+2
-0
Sigma.js
src/Gargantext/Hooks/Sigmax/Sigma.js
+7
-1
Sigma.purs
src/Gargantext/Hooks/Sigmax/Sigma.purs
+3
-1
No files found.
src/Gargantext/Components/GraphExplorer/Layout.purs
View file @
84ca8906
...
...
@@ -326,7 +326,8 @@ modeGraphType :: Types.Mode -> String
modeGraphType Types.Authors = "square"
modeGraphType Types.Institutes = "equilateral"
modeGraphType Types.Sources = "star"
modeGraphType Types.Terms = "def"
--modeGraphType Types.Terms = "def"
modeGraphType Types.Terms = "circle"
--------------------------------------------------------------
...
...
src/Gargantext/Hooks/Sigmax/Graphology.purs
View file @
84ca8906
...
...
@@ -63,6 +63,8 @@ mapEdges = runEffectFn2 _mapEdges
-- too much. We convert Types.Graph into Graphology.Graph and then
-- update Sigma.graph with this.
-- NOTE: See `sigmax.performDiff`
-- | Since we don't want to replace directly the sigma.graph, we call
-- update. This "intelligently" scans the `target` graph and updates
-- so that in the end it is the same as `source`.
...
...
src/Gargantext/Hooks/Sigmax/Sigma.js
View file @
84ca8906
...
...
@@ -249,6 +249,11 @@ let _setSettings = function(g, settings) {
}
}
let
_refresh
=
function
(
g
)
{
console
.
log
(
'[refresh], g'
,
g
);
return
g
.
refresh
();
}
export
{
_sigma
,
_addRenderer
,
dummy
as
_bindMouseSelectorPlugin
,
...
...
@@ -257,4 +262,5 @@ export { _sigma,
_getEdges
,
_getNodes
,
_proxySetSettings
,
_setSettings
};
_setSettings
,
_refresh
};
src/Gargantext/Hooks/Sigmax/Sigma.purs
View file @
84ca8906
...
...
@@ -46,7 +46,8 @@ kill s = pure $ s ... "kill" $ []
-- | Call the `refresh()` method on a sigmajs instance.
refresh :: Sigma -> Effect Unit
refresh s = pure $ s ... "refresh" $ []
refresh = runEffectFn1 _refresh
--refresh s = pure $ s ... "refresh" $ []
-- | Type representing a sigmajs renderer.
foreign import data Renderer :: Type
...
...
@@ -303,3 +304,4 @@ foreign import _proxySetSettings
settings
Unit
foreign import _setSettings :: forall settings. EffectFn2 Sigma settings Unit
foreign import _refresh :: EffectFn1 Sigma 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