Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AABoyles committed Jun 11, 2020
2 parents 06363b2 + cfd1556 commit 59f0827
Show file tree
Hide file tree
Showing 11 changed files with 1,419 additions and 10 deletions.
3 changes: 2 additions & 1 deletion components/files.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
<div class="col-7">
<select id="default-view" class="form-control form-control-sm" title="Which view should MicrobeTrace render first, once it has successfully processed the data?">
<option value="2d_network" selected>2D Network</option>
<option value="pixi">Pixi</option>
<option value="3d_network">3D Network</option>
<option value="bubbles">Bubbles</option>
<option value="table">Table</option>
Expand Down Expand Up @@ -1058,7 +1059,7 @@ <h5 id="sequence-controls-title" class="modal-title">Sequence Settings</h5>
let data = XLSX.utils.sheet_to_json(workbook.Sheets[workbook.SheetNames[0]], {header: 1, raw: false, dateNF: 'yyyy-mm-dd'});
let nodeIDs = [], nn = 0, nl = 0;

if (data[0][0]) { // triangle matrix
if (data[0][0].replace(/\"/g, '').replace(/\'/g, '')) { // triangle matrix
let topNodeIDs = [''];
data.forEach((row, i) => {
const nodeID = row[0];
Expand Down
9 changes: 6 additions & 3 deletions components/flow_diagram.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h5 class="modal-title">Export Flow Diagram</h5>
$($('#flow-variables').find('select')).each(function (i) { order.push(this.value); });
let variables = order.length;

let values = [], source_values = [], target_values = [], all_values = [], labels = [];
let values = [], source_values = [], target_values = [], all_values = [], labels = [], vars = [];
for (let i = 0; i < variables; i++) {
variable = order[i];
let n = data.length;
Expand All @@ -148,7 +148,8 @@ <h5 class="modal-title">Export Flow Diagram</h5>
}
n = values.length;
for (let j = 0; j < n; j++) {
labels.push(MT.titleize(variable + ' ' + values[j]));
labels.push(MT.titleize(values[j]));
vars.push(MT.titleize(variable));
let value = variable + '-' + values[j] + '-' + i;
if (i < variables - 1) source_values.push(value);
if (i > 0) target_values.push(value);
Expand Down Expand Up @@ -199,7 +200,9 @@ <h5 class="modal-title">Export Flow Diagram</h5>
width: 0.5
},
label: labels.map(MT.titleize),
color: session.style.widgets['flow-showNodes'] ? session.style.widgets['node-color'] : session.style.widgets['link-color']
color: session.style.widgets['flow-showNodes'] ? session.style.widgets['node-color'] : session.style.widgets['link-color'],
customdata: vars.map(MT.titleize),
hovertemplate: "<b> %{customdata}: %{label} </b><br>Incoming flow count: %{targetLinks.length} <br>Outgoing flow count: %{sourceLinks.length}"+ "<extra>%{value}</extra>"
},
link: { source, target, value }
}], {
Expand Down
890 changes: 890 additions & 0 deletions components/pixi.html

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions dist/bundle.secondary.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ <h4>MicrobeTrace requires CSS to run, but it looks like the appropriate CSS file
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle py-0" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">View</a>
<div class="dropdown-menu">
<a href="#" class="dropdown-item viewbutton" data-href="pixi">Pixi</a>
<a href="#" class="dropdown-item viewbutton" data-href="2d_network">2D Network</a>
<a href="#" class="dropdown-item viewbutton" data-href="3d_network">3D Network</a>
<a href="#" class="dropdown-item viewbutton" data-href="histogram">Histogram</a>
Expand Down Expand Up @@ -99,6 +100,9 @@ <h4>MicrobeTrace requires CSS to run, but it looks like the appropriate CSS file
<a href="#" id="AboutTab" class="dropdown-item" data-toggle="modal" data-target="#about-modal">About</a>
</div>
</li>

<li><span id="development-version" style="margin-left: 40px; color: #0037ff; font-weight: bolder; font-size: x-small;"> non production environment </span></li>

</ul>
<div id="search-form" class="form-inline navbar-form">
<label for="search">Search</label>
Expand Down
Loading

0 comments on commit 59f0827

Please sign in to comment.