Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
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
david Chavalarias
clinicaltrials
Commits
20f8ee97
Commit
20f8ee97
authored
May 15, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore changeType via add1Elem
parent
d8d77bf7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
24 deletions
+42
-24
explorerjs.html
explorerjs.html
+1
-1
Tinaweb.js
tinawebJS/Tinaweb.js
+1
-4
enviroment.js
tinawebJS/enviroment.js
+27
-7
main.js
tinawebJS/main.js
+13
-12
No files found.
explorerjs.html
View file @
20f8ee97
...
...
@@ -417,7 +417,7 @@
</div>
</div>
<div
id=
"sidebar"
>
<div
id=
"tab-container"
class=
'tab-container'
style=
"display: none;"
>
<div
id=
"tab-container"
class=
'tab-container'
>
<ul
class=
'etabs'
>
<!-- for related elements from the combined graph (eg soc => sem) -->
...
...
tinawebJS/Tinaweb.js
View file @
20f8ee97
...
...
@@ -544,7 +544,7 @@ TinaWebJS = function ( sigmacanvas ) {
setTimeout
(
function
(){
$
(
'.etabs a[href="#tabs1"]'
).
trigger
(
'click'
);
},
500
)
ChangeGraphAppearanceByAtt
(
true
)
console
.
log
(
" ############ / changeTYPE click"
);
console
.
log
(
""
)
});
...
...
@@ -555,9 +555,6 @@ TinaWebJS = function ( sigmacanvas ) {
changeLevel
();
// FIXME intention unclear
// $("#tabs1").click()
// ChangeGraphAppearanceByAtt(true) // cf. extras_explorer
console
.
log
(
" ############ / changeLEVEL click"
);
console
.
log
(
""
)
});
...
...
tinawebJS/enviroment.js
View file @
20f8ee97
...
...
@@ -63,16 +63,19 @@ function changeType() {
var
prevnodes
=
{}
var
prevedges
=
{}
for
(
var
i
in
TW
.
partialGraph
.
_core
.
graph
.
nodesIndex
)
{
anode
=
TW
.
partialGraph
.
_core
.
graph
.
nodesIndex
[
i
];
// for all possible nodes, which ones actually in the graph atm
for
(
var
i
in
TW
.
nodeIds
)
{
anode
=
TW
.
partialGraph
.
graph
.
nodes
(
TW
.
nodeIds
[
i
]);
if
(
anode
)
{
prevnodes
[
i
]
=
true
}
}
var
links_sels
=
{}
for
(
var
i
in
TW
.
partialGraph
.
_core
.
graph
.
edgesIndex
)
{
anedge
=
TW
.
partialGraph
.
_core
.
graph
.
edgesIndex
[
i
];
for
(
var
i
in
TW
.
edgeIds
)
{
anedge
=
TW
.
partialGraph
.
graph
.
edges
(
TW
.
edgeIds
[
i
]);
if
(
anedge
)
{
prevedges
[
i
]
=
true
;
if
(
anedge
.
customAttrs
)
{
...
...
@@ -93,10 +96,12 @@ function changeType() {
if
(
present
.
level
)
{
//If level=Global, fill all {X}-component
for
(
var
nid
in
TW
.
Nodes
)
{
if
(
type_t1
[
TW
.
catDict
[
TW
.
Nodes
[
nid
].
type
]])
add1Elem
(
nid
)
if
(
type_t1
[
TW
.
catDict
[
TW
.
Nodes
[
nid
].
type
]])
{
add1Elem
(
nid
)
}
}
for
(
var
eid
in
TW
.
Edges
)
{
if
(
TW
.
Edges
[
eid
].
categ
==
str_type_t1
)
add1Elem
(
eid
)
}
...
...
@@ -269,7 +274,22 @@ function changeType() {
oppos
:
[]
})
fa2enabled
=
true
;
TW
.
partialGraph
.
zoomTo
(
TW
.
partialGraph
.
_core
.
width
/
2
,
TW
.
partialGraph
.
_core
.
height
/
2
,
0.8
).
draw
();
//.startForceAtlas2();
// REFA new sigma.js
TW
.
partialGraph
.
camera
.
goTo
({
x
:
0
,
y
:
0
,
ratio
:
0.5
,
angle
:
0
})
TW
.
partialGraph
.
refresh
()
// recreates FA2 nodes array from new nodes
reInitFa2
({
useSoftMethod
:
false
,
callback
:
function
()
{
// when going local, it's nice to see the selected nodes rearrange
TW
.
partialGraph
.
startForceAtlas2
();
setTimeout
(
function
(){
TW
.
partialGraph
.
stopForceAtlas2
();
},
fa2milliseconds
)
}
})
}
...
...
tinawebJS/main.js
View file @
20f8ee97
...
...
@@ -546,17 +546,17 @@ else {
if
(
!
isUndef
(
sels
))
this
.
selections
=
sels
;
if
(
!
isUndef
(
oppos
))
this
.
opposites
=
oppos
;
this
.
LouvainFait
=
false
;
console
.
log
(
""
)
console
.
log
(
" % % % % % % % % % % "
)
console
.
log
(
"setState type: "
,
type
);
console
.
log
(
"bistate: "
+
bistate
)
console
.
log
(
"level: "
+
level
);
console
.
log
(
"selections: "
);
console
.
log
(
sels
)
console
.
log
(
"selections len: "
);
console
.
log
(
sels
.
length
)
console
.
log
(
"opposites: "
);
console
.
log
(
oppos
)
//
console.log("")
//
console.log(" % % % % % % % % % % ")
//
console.log("setState type: ", type);
//
console.log("bistate: "+bistate)
//
console.log("level: "+level);
//
console.log("selections: ");
//
console.log(sels)
//
console.log("selections len: ");
//
console.log(sels.length)
//
console.log("opposites: ");
//
console.log(oppos)
var
present
=
TW
.
partialGraph
.
states
.
slice
(
-
1
)[
0
];
// Last
var
past
=
TW
.
partialGraph
.
states
.
slice
(
-
2
)[
0
]
// avant Last
...
...
@@ -704,7 +704,8 @@ else {
}
// TEST new strategy: TW.Clusters were prepared in parseCustom
// should prepare the colors/clusters menu once and for all
// (previously, needed to be called after changeType/changeLevel)
changeGraphAppearanceByFacets
(
true
)
// set the default legend
...
...
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