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
43d8dcfd
Commit
43d8dcfd
authored
Jul 19, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit 'cd56ece' (integrate proportional labels normalization)
parents
abf79e21
c4e0df50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
Tinaweb.js
twmain/Tinaweb.js
+11
-2
methods.js
twmain/methods.js
+0
-5
No files found.
twmain/Tinaweb.js
View file @
43d8dcfd
...
...
@@ -264,6 +264,7 @@ function SelectionEngine() {
for
(
var
i
in
theSelection
)
{
let
srcnid
=
theSelection
[
i
]
var
bipaNeighs
=
TW
.
Relations
[
"XR"
][
srcnid
];
activeRelations
[
"XR"
][
srcnid
]
=
{}
...
...
@@ -276,8 +277,16 @@ function SelectionEngine() {
oppoSideNeighbors
[
bipaNeighs
[
k
]]
=
0
;
}
// cumulated for all srcnids
oppoSideNeighbors
[
bipaNeighs
[
k
]]
++
// normalize sizes by special attribute "normfactor" if present
let
normfactor
=
1
if
(
TW
.
Nodes
[
bipaNeighs
[
k
]]
&&
TW
.
Nodes
[
bipaNeighs
[
k
]].
attributes
&&
TW
.
Nodes
[
bipaNeighs
[
k
]].
attributes
.
normfactor
)
{
normfactor
=
parseFloat
(
TW
.
Nodes
[
bipaNeighs
[
k
]].
attributes
.
normfactor
)
}
// cumulated weight for all srcnids
oppoSideNeighbors
[
bipaNeighs
[
k
]]
+=
1
*
normfactor
// and the details
activeRelations
[
"XR"
][
srcnid
][
bipaNeighs
[
k
]]
++
;
...
...
twmain/methods.js
View file @
43d8dcfd
...
...
@@ -459,11 +459,6 @@ function htmlProportionalLabels(elems , limit, selectableFlag) {
fontSize
=
1
}
// normalize sizes by special attribute "normfactor" if present
if
(
TW
.
Nodes
[
id
].
attributes
.
normfactor
)
{
fontSize
=
fontSize
*
TW
.
Nodes
[
id
].
attributes
.
normfactor
}
// debug
// console.log('htmlfied_tagcloud (',id, TW.Nodes[id].label,') freq',frec,' fontSize', fontSize)
...
...
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