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
e9b07172
Commit
e9b07172
authored
Oct 24, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement in add(node|edge) ?
parent
d2928b05
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
23 deletions
+19
-23
enviroment.js
tinawebJS/js/enviroment.js
+3
-2
globalUtils.js
tinawebJS/js/globalUtils.js
+11
-0
methods.js
tinawebJS/js/methods.js
+5
-9
sigmaUtils.js
tinawebJS/js/sigmaUtils.js
+0
-12
No files found.
tinawebJS/js/enviroment.js
View file @
e9b07172
...
@@ -171,7 +171,6 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -171,7 +171,6 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
return
;
return
;
}
}
// sliderDivID = "#sliderAEdgeWeight"
// sliderDivID = "#sliderAEdgeWeight"
// type = "nodes1"
// type = "nodes1"
// type_attrb = "label"
// type_attrb = "label"
...
@@ -201,7 +200,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -201,7 +200,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
var
steps
=
filterparams
[
"steps"
]
var
steps
=
filterparams
[
"steps"
]
var
finalarray
=
filterparams
[
"finalarray"
]
var
finalarray
=
filterparams
[
"finalarray"
]
pr
(
finalarray
)
//finished
//finished
$
(
sliderDivID
).
freshslider
({
$
(
sliderDivID
).
freshslider
({
range
:
true
,
range
:
true
,
...
@@ -239,6 +238,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -239,6 +238,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
if
(
isUndef
(
getn
(
sid
)))
unHide
(
sid
)
if
(
isUndef
(
getn
(
sid
)))
unHide
(
sid
)
if
(
isUndef
(
getn
(
tid
)))
unHide
(
tid
)
if
(
isUndef
(
getn
(
tid
)))
unHide
(
tid
)
add1Edge
(
ID
)
add1Edge
(
ID
)
// pr("addedge")
}
}
}
}
...
@@ -248,6 +248,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -248,6 +248,7 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
ID
=
ids
[
id
]
ID
=
ids
[
id
]
partialGraph
.
dropEdge
(
ID
)
partialGraph
.
dropEdge
(
ID
)
Edges
[
ID
].
lock
=
true
;
Edges
[
ID
].
lock
=
true
;
// pr("removeedge")
}
}
}
}
}
}
...
...
tinawebJS/js/globalUtils.js
View file @
e9b07172
...
@@ -4,6 +4,17 @@ function pr(msg) {
...
@@ -4,6 +4,17 @@ function pr(msg) {
console
.
log
(
msg
);
console
.
log
(
msg
);
}
}
//to general utils
function
getClientTime
(){
var
totalSec
=
new
Date
().
getTime
()
/
1000
;
var
d
=
new
Date
();
var
hours
=
d
.
getHours
();
var
minutes
=
parseInt
(
totalSec
/
60
)
%
60
;
var
seconds
=
(
totalSec
%
60
).
toFixed
(
4
);
var
result
=
(
hours
<
10
?
"0"
+
hours
:
hours
)
+
":"
+
(
minutes
<
10
?
"0"
+
minutes
:
minutes
)
+
":"
+
(
seconds
<
10
?
"0"
+
seconds
:
seconds
);
return
result
;
}
//to general utils (not used btw)
//to general utils (not used btw)
function
cloneObject
(
source
)
{
function
cloneObject
(
source
)
{
...
...
tinawebJS/js/methods.js
View file @
e9b07172
...
@@ -451,9 +451,11 @@ function graphTagCloudElem(node_id) {
...
@@ -451,9 +451,11 @@ function graphTagCloudElem(node_id) {
if
(
Nodes
[
node_id
].
type
==
catSoc
)
{
if
(
Nodes
[
node_id
].
type
==
catSoc
)
{
voisinage
=
nodes1
;
voisinage
=
nodes1
;
vars
=
[
"social"
,
"a"
]
vars
=
[
"social"
,
"a"
]
$
(
"#colorGraph"
).
show
();
}
else
{
}
else
{
voisinage
=
nodes2
;
voisinage
=
nodes2
;
vars
=
[
"semantic"
,
"b"
]
vars
=
[
"semantic"
,
"b"
]
$
(
"#colorGraph"
).
hide
();
}
}
var
finalnodes
=
{}
var
finalnodes
=
{}
...
@@ -488,6 +490,7 @@ function graphTagCloudElem(node_id) {
...
@@ -488,6 +490,7 @@ function graphTagCloudElem(node_id) {
$
(
'.gradient'
).
css
({
"background-size"
:
"90px 90px"
});
$
(
'.gradient'
).
css
({
"background-size"
:
"90px 90px"
});
}
}
function
updateDownNodeEvent
(
selectionRadius
){
function
updateDownNodeEvent
(
selectionRadius
){
...
@@ -1244,15 +1247,6 @@ function createEdgesForExistingNodes (typeOfNodes) {
...
@@ -1244,15 +1247,6 @@ function createEdgesForExistingNodes (typeOfNodes) {
}
}
function
hideEverything
(){
function
hideEverything
(){
//visibleNodes=[];
//visibleEdges=[];
// if(swclickActual=="social" && semanticConverged<2){
// if(semanticConverged===1) semanticConverged++;
// }
// if(swclickActual=="semantic" && socialConverged<2){
// if(socialConverged===1) socialConverged++;
// }
//
pr
(
"
\
thiding all"
);
pr
(
"
\
thiding all"
);
nodeslength
=
0
;
nodeslength
=
0
;
for
(
var
n
in
partialGraph
.
_core
.
graph
.
nodesIndex
){
for
(
var
n
in
partialGraph
.
_core
.
graph
.
nodesIndex
){
...
@@ -1272,6 +1266,7 @@ function unHide(id){
...
@@ -1272,6 +1266,7 @@ function unHide(id){
// pr("in unhide "+iwantograph+" | swMacro: "+swMacro)
// pr("in unhide "+iwantograph+" | swMacro: "+swMacro)
if
(
id
.
split
(
";"
).
length
==
1
)
{
if
(
id
.
split
(
";"
).
length
==
1
)
{
// i've received a NODE
// i've received a NODE
if
(
!
isUndef
(
getn
(
id
)))
return
;
if
(
Nodes
[
id
])
{
if
(
Nodes
[
id
])
{
var
anode
=
({
var
anode
=
({
id
:
id
,
id
:
id
,
...
@@ -1296,6 +1291,7 @@ function unHide(id){
...
@@ -1296,6 +1291,7 @@ function unHide(id){
}
}
else
{
// It's an edge!
else
{
// It's an edge!
//visibleEdges.push(id);
//visibleEdges.push(id);
if
(
!
isUndef
(
gete
(
id
)))
return
;
if
(
Edges
[
id
]
&&
!
Edges
[
id
].
lock
){
if
(
Edges
[
id
]
&&
!
Edges
[
id
].
lock
){
var
anedge
=
{
var
anedge
=
{
...
...
tinawebJS/js/sigmaUtils.js
View file @
e9b07172
...
@@ -129,7 +129,6 @@ function getNodeIDs(elems){
...
@@ -129,7 +129,6 @@ function getNodeIDs(elems){
}
}
function
getSelections
(){
function
getSelections
(){
params
=
[];
params
=
[];
for
(
var
i
in
selections
){
for
(
var
i
in
selections
){
...
@@ -183,17 +182,6 @@ function getArrSubkeys(arr,id) {
...
@@ -183,17 +182,6 @@ function getArrSubkeys(arr,id) {
return
result
;
return
result
;
}
}
//to general utils
function
getClientTime
(){
var
totalSec
=
new
Date
().
getTime
()
/
1000
;
var
d
=
new
Date
();
var
hours
=
d
.
getHours
();
var
minutes
=
parseInt
(
totalSec
/
60
)
%
60
;
var
seconds
=
(
totalSec
%
60
).
toFixed
(
4
);
var
result
=
(
hours
<
10
?
"0"
+
hours
:
hours
)
+
":"
+
(
minutes
<
10
?
"0"
+
minutes
:
minutes
)
+
":"
+
(
seconds
<
10
?
"0"
+
seconds
:
seconds
);
return
result
;
}
function
getCountries
(){
function
getCountries
(){
var
nodes
=
getVisibleNodes
();
var
nodes
=
getVisibleNodes
();
...
...
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