Commit 49e98818 authored by Philippe Bardou's avatar Philippe Bardou
Browse files

Multiple jvenn on the same page !

Add displaySwitch param to show/hide the switch button panel.
parent 02b0cbe5
......@@ -45,6 +45,7 @@
<li><a href="#series"><i class="icon-chevron-right"></i> series</a></li>
<li><a href="#displayMode"><i class="icon-chevron-right"></i> displayMode</a></li>
<li><a href="#displayStat"><i class="icon-chevron-right"></i> displayStat</a></li>
<li><a href="#displaySwitch"><i class="icon-chevron-right"></i> displaySwitch</a></li>
<li><a href="#fnClickCallback"><i class="icon-chevron-right"></i> fnClickCallback</a></li>
<li><a href="#colors"><i class="icon-chevron-right"></i> colors</a></li>
<li><a href="#fontFamily"><i class="icon-chevron-right"></i> fontFamily</a></li>
......@@ -159,6 +160,19 @@ $(document).ready(function(){
});</pre>
</section>
<section id="displaySwitch">
<div class="page-header">
<h1>displaySwitch</h1>
</div>
<p>The default value is true to display, if you provide more than 3 lists, a switch button panel.</p>
<pre class="prettyprint linenums">
$(document).ready(function(){
$('#example').jvenn({
displaySwitch: false
});
});</pre>
</section>
<section id="fnClickCallback">
<div class="page-header">
<h1>fnClickCallback</h1>
......
......@@ -29,6 +29,7 @@
var colorDefault = ["#006600", "#5a9bd4", "#f15a60", "#cfcf1b", "#ff7500", "#c09853"],
displayMode = "classic",
displayStat = true,
displaySwitch= true,
shortNumber = true,
fontSize = "12px",
fontFamily = "Arial";
......@@ -71,11 +72,12 @@
colors: colorsTable,
fontSize: fontSize,
fontFamily: fontFamily,
searchInput: $("#search-field"),
searchStatus: $("#search-status"),
displayMode: displayMode,
shortNumber: shortNumber,
displayStat: displayStat,
searchInput: $("#search-field"),
searchStatus: $("#search-status"),
displayMode: displayMode,
shortNumber: shortNumber,
displayStat: displayStat,
displaySwitch: displaySwitch,
fnClickCallback: function() {
var value = "";
if (this.listnames.length == 1) {
......@@ -568,6 +570,15 @@
updateJvenn();
});
$("#dsw_yes").click(function() {
displaySwitch = true;
updateJvenn();
});
$("#dsw_no").click(function() {
displaySwitch = false;
updateJvenn();
});
$("#dm_classic").click(function() {
displayMode = "classic";
updateJvenn();
......@@ -808,6 +819,12 @@
<button id="ds_yes" type="button" class="btn btn-mini active">Yes</button>
<button id="ds_no" type="button" class="btn btn-mini">No</button>
</div><br/>
<img src="img/bullet.png" style="vertical-align:initial;padding-top:10px">
Display the switch button panel (if more than 3 lists provided):
<div class="btn-group" data-toggle="buttons-radio">
<button id="dsw_yes" type="button" class="btn btn-mini active">Yes</button>
<button id="dsw_no" type="button" class="btn btn-mini">No</button>
</div><br/>
<img src="img/bullet.png" style="vertical-align:initial;padding-top:10px">
Substitute intersection count size by a question mark:
<div class="btn-group" data-toggle="buttons-radio">
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
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