Commit 01b1a30c authored by Philippe Bardou's avatar Philippe Bardou

Search !

parent 7cf9a050
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Jvenn</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
\relax
\global\@namedef{num@address}{2}
\global\@namedef{num@author}{5}
\citation{Venn1880}
\citation{Edwards2004}
\citation{Bronwen2012}
\citation{RVennDiagram}
\citation{Hulsen2008}
\citation{venny}
\citation{canvasxpress}
\citation{googleAPI}
\thanksnewlabel{au1@email}{{Philippe.Bardou@toulouse.inra.fr}{1}}
\thanksnewlabel{au2@email}{{Jerome.Mariette@toulouse.inra.fr}{1}}
\thanksnewlabel{au3@email}{{Frederic.Escudie@toulouse.inra.fr}{1}}
\thanksnewlabel{au4@email}{{Christophe.Djemiel@toulouse.inra.fr}{1}}
\thanksnewlabel{au5@email}{{Christophe.Klopp@toulouse.inra.fr}{1}}
\thanksnewlabel{au2thanks}{{*}{1}}
\thanksnewlabel{n1thanks}{{\textdagger }{1}}
\@writefile{toc}{\contentsline {section}{Abstract}{1}}
\citation{Westesson01032013}
\citation{Lopes2010}
\citation{DeuPons2014}
\citation{Bianchia2013}
\citation{Aravindraja2013}
\citation{Mariette2012}
\citation{Mariette}
\citation{SanClemente}
\citation{jquery}
\bibstyle{bmc-mathphys}
\bibdata{bmc_jvenn}
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces {\mathversion {bold}\bfseries A six lists classic Venn diagram.} This Venn diagram displays overlaps between six different biological samples. When the user clicks on a figure, it calls the developer defined function. The icon located on the top-right, allows users to download the diagram as a PNG file. On the bottom-right of the chart, a switch button panel allowing to activate or dis-activate lists to access a specific intersection count. The charts showing the lists size repartition and the number of common and specific elements are located underneath the diagram.}}{4}}
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces {\mathversion {bold}\bfseries A six lists Edwards-Venn diagram.} On mouse over a figure, the shape corresponding to the list involved in the intersection are highlighted and the other ones faded out. In this example, the user points the intersection between samples SRR068049, SRR068051 and SRR068052 which contains eight different items.}}{4}}
\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Available formats and example for the \textit {series} option.}}{4}}
\newlabel{LastPage}{{}{4}}
\relax
\newlabel{totpage}{{2}{0}}
\newlabel{LastPage}{{}{1}}
\relax
\newlabel{totpage}{{5}{0}}
\newlabel{LastPage}{{}{4}}
......@@ -47,7 +47,9 @@
$("#jvenn-container").jvenn({
series: seriesTable,
displayMode: $("#venn-type").val(),
searchInput: $("#search-field"),
searchStatus: $("#search-status"),
displayMode: $("#venn-type").val(),
displayStat: true,
fnClickCallback: function() {
var value = "";
......@@ -202,7 +204,10 @@
<div class="hero-unit">
<h1>Hello jvenn!</h1>
<p class="bodytext"> Paste up to <strong>six</strong> lists using one row per element, then click
the numbers in the <select id="venn-type" class="input-small" style="width:110px;margin-top:5px"><option value="classic">classic</option><option value="edwards">Edwards'</option></select> venn to see the results.
the numbers in the <select id="venn-type" class="input-small" style="width:110px;margin-top:8px"><option value="classic">classic</option><option value="edwards">Edwards'</option></select> venn to see the results.
<br/>Find an element in list(s):
<input id="search-field" type="text" style="margin-top:8px" placeholder="enter an element name..."/>
<span id="search-status" class="label label-info" style="vertical-align: 15px; margin-left: -20px;"></span>
</p>
</div>
<div class="row-fluid">
......
......@@ -72,6 +72,7 @@
displayStat: false,
shortNumber: true,
searchInput: null,
searchStatus: null,
searchMinSize:1,
// Colors must be RGB
// green , blue , red , yellow , orange , brown
......@@ -1702,6 +1703,9 @@
// Clear search
if (opts.searchInput != null) {
opts.searchInput.val("");
if (opts.searchStatus != null) {
opts.searchStatus.text("");
}
}
// Draw
clearCanvas();
......@@ -2222,7 +2226,6 @@
function search( val, min_size ) {
var min_size = (min_size == null ? 1 : min_size)
var val_lower_case = val.toLowerCase();
var groups_status = new Array();
var visible_id = "resultC000000";
var nb_find = 0;
......@@ -2232,7 +2235,7 @@
}
});
if ( val == "" || min_size > val.length) { // Search is empty
if (val == "" || min_size > val.length) { // Search is empty
for (var group_name in groups_status) {
visible_id = unselect( group_name );
}
......@@ -2242,8 +2245,8 @@
var perfect_match = false;
$(".number-black:not(.number-empty)").each( function() {
for (var idx = 0 ; idx < this.list.length && !perfect_match ; idx++) {
if( this.list[idx].toLowerCase().indexOf(val_lower_case) != -1) {
if( this.list[idx].toLowerCase() == val_lower_case ) {
if (this.list[idx].indexOf(val) != -1) {
if (this.list[idx] == val) {
perfect_match = true;
}
listnames = this.listnames;
......@@ -2257,7 +2260,7 @@
}
nb_find = 1;
}
// Update if search is not ambigous
// Update if search is not ambiguous
if (nb_find <= 1) { // Find or unfind
for (var group_name in groups_status) {
if( groups_status[group_name] == 'selected' ) {
......@@ -2266,13 +2269,26 @@
visible_id = unselect( group_name, false );
}
}
} else { // Ambigous
} else { // Ambiguous
for (var group_name in groups_status) {
visible_id = unselect( group_name );
}
}
}
// Update status
if( opts.searchStatus != null ) {
if (val == "" || min_size > val.length) {
opts.searchStatus.text( "" );
} else if (nb_find == 0) {
opts.searchStatus.text( "not found" );
} else if (nb_find == 1) {
opts.searchStatus.text( "found" );
} else if (nb_find > 1) {
opts.searchStatus.text( "ambiguous" );
}
}
// Display
clearCanvas();
if (opts.displayMode == 'edwards') {
......
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