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
e52afd97
Commit
e52afd97
authored
May 20, 2016
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small fix + better loop
parent
3b2d568c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
25 deletions
+23
-25
NGrams_dyna_chart_and_table.js
static/lib/gargantext/NGrams_dyna_chart_and_table.js
+23
-25
No files found.
static/lib/gargantext/NGrams_dyna_chart_and_table.js
View file @
e52afd97
...
...
@@ -2042,6 +2042,29 @@ function AfterAjax(sourceUrl) {
// console.log(JSON.stringify(NGrams))
// -------------------------------------------------------------------
// ----------------------------------------- MAPLIST
// keepstateId = 1
keepstateId
=
System
[
0
][
"statesD"
][
"keep"
]
if
(
Object
.
keys
(
NGrams
[
"map"
]).
length
>
0
)
{
for
(
var
ngram_id
in
NGrams
[
"map"
])
{
myNgramInfo
=
NGrams
[
"main"
].
ngrams
[
ngram_id
]
// initialize state of maplist items
myNgramInfo
[
"state"
]
=
keepstateId
;
}
}
// ----------------------------------------- STOPLIST
// delstateId = 2
delstateId
=
System
[
0
][
"statesD"
][
"delete"
]
if
(
Object
.
keys
(
NGrams
[
"stop"
]).
length
>
0
)
{
for
(
var
ngram_id
in
NGrams
[
"stop"
])
{
console
.
log
(
'stopping '
+
ngram_id
)
myNgramInfo
=
NGrams
[
"main"
].
ngrams
[
ngram_id
]
// initialize state of stoplist items
myNgramInfo
[
"state"
]
=
delstateId
;
}
}
// Deleting subforms from the ngrams-table, clean start baby!
if
(
Object
.
keys
(
NGrams
[
"group"
].
links
).
length
>
0
)
{
...
...
@@ -2056,10 +2079,6 @@ function AfterAjax(sourceUrl) {
}
}
// debug:
// console.log('~~~~~~~~~~~~~> (sub) _forms')
// console.log( _forms )
// ------------------------------------------- MAINLIST
// ngrams_data_ will update NGrams.main.ngrams (with subforms removed)
var
ngrams_data_
=
{}
...
...
@@ -2093,27 +2112,6 @@ function AfterAjax(sourceUrl) {
// console.log( NGrams["main"] )
// ----------------------------------------- MAPLIST
if
(
Object
.
keys
(
NGrams
[
"map"
]).
length
>
0
)
{
for
(
var
ngram_id
in
NGrams
[
"main"
].
ngrams
)
{
myNgram
=
NGrams
[
"main"
].
ngrams
[
ngram_id
]
if
(
NGrams
[
"map"
][
ngram_id
])
{
// keepstateId = 1
keepstateId
=
System
[
0
][
"statesD"
][
"keep"
]
// initialize state of maplist items
myNgram
[
"state"
]
=
keepstateId
;
}
else
if
(
NGrams
[
"stop"
][
ngram_id
])
{
// delstateId = 2
delstateId
=
System
[
0
][
"statesD"
][
"delete"
]
// initialize state of stoplist items
myNgram
[
"state"
]
=
delstateId
;
}
}
}
// Building the Score-Selector //NGrams["scores"]
var
FirstScore
=
NGrams
[
"main"
].
scores
.
initial
// TODO scores_div
...
...
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