Commit bee9be79 authored by Romain Loth's avatar Romain Loth

settings and details

parent 52c489c2
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<!-- ## fonts ## --> <!-- ## fonts ## -->
<link type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet"> <link type="text/css" href="https://fonts.googleapis.com/css?family=Ubuntu" rel="stylesheet">
<link type="text/css" href="https://fonts.googleapis.com/css?family=Droid%20Sans" rel="stylesheet"> <!-- <link type="text/css" href="https://fonts.googleapis.com/css?family=Droid%20Sans" rel="stylesheet"> -->
<link rel="stylesheet" href="static/explorerlibs/jquery/jquery-ui.css" media="screen"> <link rel="stylesheet" href="static/explorerlibs/jquery/jquery-ui.css" media="screen">
<link rel="stylesheet" href="static/explorerlibs/bootstrap/css/bootstrap.css" media="screen"> <link rel="stylesheet" href="static/explorerlibs/bootstrap/css/bootstrap.css" media="screen">
...@@ -18,25 +18,12 @@ ...@@ -18,25 +18,12 @@
<link rel="stylesheet" href="static/explorerlibs/css2/sidebar.css" media="screen"> <link rel="stylesheet" href="static/explorerlibs/css2/sidebar.css" media="screen">
<link rel="stylesheet" href="static/explorerlibs/bootswatch/css/bootswatch.css"> <link rel="stylesheet" href="static/explorerlibs/bootswatch/css/bootswatch.css">
<link rel="stylesheet" href="static/explorerlibs/css2/font.css" type="text/css"> <link rel="stylesheet" href="static/explorerlibs/css2/font.css" type="text/css">
<link rel="stylesheet" href="static/css/comex.css" type="text/css"> <!-- <link rel="stylesheet" href="static/css/comex.css" type="text/css"> -->
<style>
.sigma_labels_canvas {
letter-spacing: -.1em;
/*^^^^^^^^^^^^^^
must be the same in hover_canvas */
opacity: .9;
}
.sigma_hover_canvas {
letter-spacing: -.1em;
}
</style>
</head> </head>
<body class="gradient"> <body>
<!-- this is the topbar --> <!-- this is the topbar -->
<div id="fixedtop" class="navbar navbar-default navbar-fixed-top"> <div id="fixedtop" class="navbar navbar-default navbar-fixed-top">
<div class="container"> <div class="container">
......
...@@ -533,7 +533,10 @@ class MyExtractor: ...@@ -533,7 +533,10 @@ class MyExtractor:
if neigh != str(scholar): if neigh != str(scholar):
source=str(scholar) source=str(scholar)
target=str(neigh) target=str(neigh)
weight=self.log_sim(neighbors[str(neigh)], # weight=self.log_sim(neighbors[str(neigh)],
# scholarsMatrix[nodeId1]['occ'],
# scholarsMatrix[neigh]['occ'])
weight=self.jaccard(neighbors[str(neigh)],
scholarsMatrix[nodeId1]['occ'], scholarsMatrix[nodeId1]['occ'],
scholarsMatrix[neigh]['occ']) scholarsMatrix[neigh]['occ'])
#mlog("DEBUG", "\t"+source+","+target+" = "+str(weight)) #mlog("DEBUG", "\t"+source+","+target+" = "+str(weight))
......
...@@ -267,9 +267,15 @@ def doors_login(email, password, config): ...@@ -267,9 +267,15 @@ def doors_login(email, password, config):
else: else:
raise Exception('Doors request failed') raise Exception('Doors request failed')
if not doorsProto:
# ID is a string of the form: "UserID(12849e74-b039-481f-b8eb-1e52562fbda6)"
capture = match(r'UserID\(([0-9a-f-]+)\)', uid)
if capture:
uid = capture.groups()[0]
return uid return uid
def doors_register(email, password, name, config): def doors_register(email, password, name, config=REALCONFIG):
""" """
Remote query to Doors API to register a user Remote query to Doors API to register a user
""" """
......
...@@ -123,11 +123,11 @@ ...@@ -123,11 +123,11 @@
.gradient { .gradient {
background-color: #f0f0f8; background-color: #f0f0f8;
background-image: -webkit-radial-gradient(#ffffff, #d8d8e0); background-image: -moz-radial-gradient(#ffffff, #d8d8e0); /*background-image: -webkit-radial-gradient(#ffffff, #d8d8e0); background-image: -moz-radial-gradient(#ffffff, #d8d8e0);*/
/*background-color: #434343;*/ /*background-color: #434343;*/
/*background-image: linear-gradient(#434343, #282828);*/ /*background-image: linear-gradient(#434343, #282828);*/
background-image: linear-gradient(0deg, transparent 24%, rgba(0, 0, 0, .02) 25%, rgba(0, 0, 0, .02) 26%, transparent 27%, transparent 74%, rgba(0, 0, 0, .02) 75%, rgba(0, 0, 0, .02) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(0, 0, 0, .02) 25%, rgba(0, 0, 0, .02) 26%, transparent 27%, transparent 74%, rgba(0, 0, 0, .02) 75%, rgba(0, 0, 0, .02) 76%, transparent 77%, transparent); /*background-image: linear-gradient(0deg, transparent 24%, rgba(0, 0, 0, .02) 25%, rgba(0, 0, 0, .02) 26%, transparent 27%, transparent 74%, rgba(0, 0, 0, .02) 75%, rgba(0, 0, 0, .02) 76%, transparent 77%, transparent), linear-gradient(90deg, transparent 24%, rgba(0, 0, 0, .02) 25%, rgba(0, 0, 0, .02) 26%, transparent 27%, transparent 74%, rgba(0, 0, 0, .02) 75%, rgba(0, 0, 0, .02) 76%, transparent 77%, transparent);*/
background-size: 50px 50px; /*background-size: 50px 50px;*/
} }
/* ZOOM IN OUT */ /* ZOOM IN OUT */
......
/**
* @fileoverview
* rootindex link fixing
* @todo
* - package.json
*
* @version 1
* @copyright ISCPIF-CNRS 2016
* @author romain.loth@iscpif.fr
*
*/
// just workaround for the profile/register iframe's loading mechanism to https
// context:
// curiously, a relative path for iframe src:'/services/user/register'
// doesn't work like other relative paths (reproducing current scheme)
// so we put an absolute path and change the domain name at rendering.
var relsrc = document.getElementById('inlink').src
document.getElementById('inlink').src = 'https://'+location.host+'/'+relsrc
console.log("rootindex controllers load OK")
...@@ -358,11 +358,15 @@ var ForceAtlas2 = function(graph) { ...@@ -358,11 +358,15 @@ var ForceAtlas2 = function(graph) {
var graph = this.graph; var graph = this.graph;
// Tuning // Tuning
if (graph.nodes.length >= 100) { // if (graph.nodes.length >= 100) {
this.p.scalingRatio = 2.0; // this.p.scalingRatio = 2.0;
} else { // } else {
this.p.scalingRatio = 10.0; // this.p.scalingRatio = 10.0;
} // }
this.p.scalingRatio = 100 / Math.sqrt(graph.nodes.length)
console.warn ("this p scalingRatio", this.p.scalingRatio, "for length:", graph.nodes.length)
// POSS: trying proportional scaling instead of if // POSS: trying proportional scaling instead of if
// NB: *smaller* scaling ratio improves non overlap of close neighboors // NB: *smaller* scaling ratio improves non overlap of close neighboors
......
...@@ -127,7 +127,7 @@ function bringTheNoise(sourceinfo,type){ ...@@ -127,7 +127,7 @@ function bringTheNoise(sourceinfo,type){
$('.etabs a[href="#tabs1"]').trigger('click'); $('.etabs a[href="#tabs1"]').trigger('click');
}); });
printStates() // printStates()
pr(" ############ / changeTYPE click"); pr(" ############ / changeTYPE click");
pr("") pr("")
}); });
......
...@@ -33,7 +33,7 @@ var catSem = "NGram"; ...@@ -33,7 +33,7 @@ var catSem = "NGram";
// newSize = oldSize + (sizeMult * oldSize) // newSize = oldSize + (sizeMult * oldSize)
var sizeMult = []; var sizeMult = [];
sizeMult[catSoc] = 0.7; sizeMult[catSoc] = -.5;
sizeMult[catSem] = 0.0; sizeMult[catSem] = 0.0;
var inactiveColor = '#666'; var inactiveColor = '#666';
...@@ -59,7 +59,7 @@ var desirableScholarSize=6; //Remember that all scholars have the same size! ...@@ -59,7 +59,7 @@ var desirableScholarSize=6; //Remember that all scholars have the same size!
* - "off": button doesn't exist, fa2 stopped forever * - "off": button doesn't exist, fa2 stopped forever
**/ var fa2enabled=false;//"off"; **/ var fa2enabled=false;//"off";
var stopcriteria = false; var stopcriteria = false;
var iterationsFA2=2000; // <= should be proportional to graph size var iterationsFA2=3000; // <= should be proportional to graph size
// TODO also adjust speed after initial // TODO also adjust speed after initial
var seed=999999999;//defaultseed var seed=999999999;//defaultseed
var semanticConverged=false; var semanticConverged=false;
...@@ -75,12 +75,13 @@ var sigmaJsDrawingProperties = { ...@@ -75,12 +75,13 @@ var sigmaJsDrawingProperties = {
defaultLabelSize: 10,//in fact I'm using it as minLabelSize' defaultLabelSize: 10,//in fact I'm using it as minLabelSize'
defaultLabelBGColor: '#fff', defaultLabelBGColor: '#fff',
defaultLabelHoverColor: '#000', defaultLabelHoverColor: '#000',
labelThreshold: 8, labelThreshold: 7,
labelSizeRatio: 1.7, // for proportional display only labelSizeRatio: 1.3, // for proportional display only
defaultEdgeType: 'curve', defaultEdgeType: 'curve',
font:"Droid Sans", // font:"Droid Sans",
font:"Ubuntu",
borderSize: 2.5,//Something other than 0 borderSize: 2,//Something other than 0
nodeBorderColor: "default",//exactly like this nodeBorderColor: "default",//exactly like this
defaultNodeBorderColor: "black"//,//Any color of your choice defaultNodeBorderColor: "black"//,//Any color of your choice
//defaultBorderView: "always" //defaultBorderView: "always"
......
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
<div class="panel panel-default wwwpanel"> <div class="panel panel-default wwwpanel">
<div class="panel-heading"> <div class="panel-heading">
<p class="pull-up-right"> <p class="pull-up-right">
<a target="_blank" href="/services/user/{% if current_user.info %}profile{% else %}register{% endif %}"> <a id="inlink" target="_blank" href="/services/user/{% if current_user.info %}profile{% else %}register{% endif %}">
<span class="glyphicon glyphicon-new-window"></span> <span class="glyphicon glyphicon-new-window"></span>
Open in another tab Open in another tab
</a> </a>
...@@ -283,5 +283,6 @@ ...@@ -283,5 +283,6 @@
// --------- // ---------
var uinfo = {{ (current_user.json_info | safe) if current_user.info else ("null" | safe) }}; var uinfo = {{ (current_user.json_info | safe) if current_user.info else ("null" | safe) }};
</script> </script>
<script src="{{ url_for('static', filename='js/comex_page_rootindex.js') }}"></script>
{% endblock %} {% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment