Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
1e49df00
Commit
1e49df00
authored
Nov 24, 2014
by
pksm3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DataScanner,enviroment: ok
parent
6063efba
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
14 deletions
+19
-14
DataScanner.js
tinawebJS/DataScanner.js
+3
-3
enviroment.js
tinawebJS/enviroment.js
+16
-8
main.js
tinawebJS/main.js
+0
-3
No files found.
tinawebJS/DataScanner.js
View file @
1e49df00
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
function
scanDataFolder
(){
function
scanDataFolder
(){
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
twjs
+
'php/DirScan_main.php'
,
url
:
'php/DirScan_main.php'
,
//data: "type="+type+"&query="+jsonparams,
//data: "type="+type+"&query="+jsonparams,
//contentType: "application/json",
//contentType: "application/json",
//dataType: 'json',
//dataType: 'json',
...
@@ -31,12 +31,12 @@ function jsActionOnGexfSelector(gexfLegend){
...
@@ -31,12 +31,12 @@ function jsActionOnGexfSelector(gexfLegend){
}
}
function
listGexfs
(){
function
listGexfs
(){
divlen
=
$
(
"#gexf"
).
length
;
divlen
=
$
(
"#gexf
s
"
).
length
;
if
(
divlen
>
0
)
{
if
(
divlen
>
0
)
{
param
=
JSON
.
stringify
(
gexfDict
);
param
=
JSON
.
stringify
(
gexfDict
);
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
twjs
+
'php/listFiles.php'
,
url
:
'php/listFiles.php'
,
//contentType: "application/json",
//contentType: "application/json",
//dataType: 'json',
//dataType: 'json',
success
:
function
(
data
){
success
:
function
(
data
){
...
...
tinawebJS/enviroment.js
View file @
1e49df00
...
@@ -182,7 +182,6 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -182,7 +182,6 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
// criteria = "size"
// criteria = "size"
if
(
partialGraph
.
_core
.
graph
.
edges
.
length
==
0
)
{
if
(
partialGraph
.
_core
.
graph
.
edges
.
length
==
0
)
{
$
(
sliderDivID
).
freshslider
({
$
(
sliderDivID
).
freshslider
({
range
:
true
,
range
:
true
,
step
:
1
,
step
:
1
,
...
@@ -192,11 +191,10 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -192,11 +191,10 @@ function EdgeWeightFilter(sliderDivID , type_attrb , type , criteria) {
console
.
log
(
low
,
high
);
console
.
log
(
low
,
high
);
}
}
});
});
return
;
return
;
}
}
var
filterparams
=
AlgorithmForSliders
(
partialGraph
.
_core
.
graph
.
e
dges
,
type_attrb
,
type
,
criteria
)
var
filterparams
=
AlgorithmForSliders
(
E
dges
,
type_attrb
,
type
,
criteria
)
var
steps
=
filterparams
[
"steps"
]
var
steps
=
filterparams
[
"steps"
]
var
finalarray
=
filterparams
[
"finalarray"
]
var
finalarray
=
filterparams
[
"finalarray"
]
...
@@ -369,7 +367,8 @@ function NodeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -369,7 +367,8 @@ function NodeWeightFilter(sliderDivID , type_attrb , type , criteria) {
return
;
return
;
}
}
var
filterparams
=
AlgorithmForSliders
(
partialGraph
.
_core
.
graph
.
nodes
,
type_attrb
,
type
,
criteria
)
var
filterparams
=
AlgorithmForSliders
(
Nodes
,
type_attrb
,
type
,
criteria
)
//swap
var
steps
=
filterparams
[
"steps"
]
var
steps
=
filterparams
[
"steps"
]
var
finalarray
=
filterparams
[
"finalarray"
]
var
finalarray
=
filterparams
[
"finalarray"
]
...
@@ -440,13 +439,22 @@ function NodeWeightFilter(sliderDivID , type_attrb , type , criteria) {
...
@@ -440,13 +439,22 @@ function NodeWeightFilter(sliderDivID , type_attrb , type , criteria) {
function
AlgorithmForSliders
(
elements
,
type_attrb
,
type
,
criteria
)
{
function
AlgorithmForSliders
(
elements
,
type_attrb
,
type
,
criteria
)
{
// // ( 1 )
// // ( 1 )
// // get visible sigma nodes|edges
// // get visible sigma nodes|edges
elems
=
elements
.
filter
(
function
(
e
)
{
return
e
[
type_attrb
]
==
type
;
})
;
var
elems
=
[]
;
// // ( 2 )
// // ( 2 )
// // extract [ "edgeID" : edgeWEIGHT ] | [ "nodeID" : nodeSIZE ]
// // extract [ "edgeID" : edgeWEIGHT ] | [ "nodeID" : nodeSIZE ]
// // and save this into edges_weight | nodes_size
// // and save this into edges_weight | nodes_size
for
(
var
e
in
elements
)
{
// pr(elements[e])
// pr("\t"+type_attrb)
if
(
elements
[
e
][
type_attrb
]
==
type
)
elems
.
push
(
elements
[
e
])
}
var
elem_attrb
=
[]
var
elem_attrb
=
[]
for
(
var
i
in
elems
)
{
for
(
var
i
in
elems
)
{
e
=
elems
[
i
]
e
=
elems
[
i
]
...
@@ -458,7 +466,7 @@ function AlgorithmForSliders( elements , type_attrb , type , criteria) {
...
@@ -458,7 +466,7 @@ function AlgorithmForSliders( elements , type_attrb , type , criteria) {
// pr(elem_attrb)
// pr(elem_attrb)
// // ( 3 )
// // ( 3 )
// // order dict edges_weight by edge weight | nodes_size by node size
// // order dict edges_weight by edge weight | nodes_size by node size
var
result
=
ArraySortByValue
(
elem_attrb
,
function
(
a
,
b
){
var
result
=
ArraySortByValue
(
elem_attrb
,
function
(
a
,
b
){
return
a
-
b
return
a
-
b
//ASCENDENT
//ASCENDENT
...
...
tinawebJS/main.js
View file @
1e49df00
...
@@ -92,9 +92,6 @@ function sigmaLimits(){
...
@@ -92,9 +92,6 @@ function sigmaLimits(){
function
bringTheNoise
(
pathfile
,
type
){
function
bringTheNoise
(
pathfile
,
type
){
$
(
"#semLoader"
).
hide
();
$
(
"#semLoader"
).
hide
();
$
(
'#modalloader'
).
modal
(
'show'
);
// $('.selectpicker').selectpicker();
// $('.selectpicker').selectpicker();
...
...
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