Added some selecting features

This commit is contained in:
Kaelin Hooper
2016-08-09 15:18:39 -07:00
parent 53ef2dd461
commit 3acf8ec275
2 changed files with 9 additions and 7 deletions
@@ -39,6 +39,7 @@ function StackDelegate(domain, filename, stackType, summaryStackData) {
changeCellState(cell, true); // Change to selected state
self.selectedCell = cell;
} else if (cell.hasOwnProperty("selected") && cell.selected == true) {
if (self.selectedCell != null && $(cell)[0] == $(self.selectedCell)[0]) { return; }
changeCellState(cell, false);
self.clearSelectedCell();
}
@@ -13,10 +13,10 @@
<div class="nav"></div>
<form id="filtersForm">
Start:<input class="filter" name="start" list="start-filter-list" type="text">
Start:<input class="filter" id="start-filter" name="start" list="start-filter-list" type="text">
<datalist id="start-filter-list"></datalist>
End:<input class="filter" name="end" list="end-filter-list" type="text">
End:<input class="filter" id="end-filter" name="end" list="end-filter-list" type="text">
<datalist id="end-filter-list"></datalist>
GroupPats:<input class="filter" name="grouppats" list="grouppats-filter-list" type="text">
@@ -262,8 +262,8 @@
<td>" + stackData[i].inclusiveMetricPercent + "</td>\
<td>" + stackData[i].inclusiveMetric + "</td>\
<td>" + stackData[i].exclusiveFoldedCount + "</td>\
<td>" + stackData[i].firstTimeRelativeMSec + "</td>\
<td>" + stackData[i].lastTimeRelativeMSec + "</td>\
<td relevant-filter-id=\"#start-filter\">" + stackData[i].firstTimeRelativeMSec + "</td>\
<td relevant-filter-id=\"#end-filter\">" + stackData[i].lastTimeRelativeMSec + "</td>\
</tr>";
}
@@ -328,9 +328,10 @@
// TODO: Double click on first and last
//$(document).on("dblclick", ".is-active table tbody tr td", function (cell) {
// console.log($(cell.target).text());
//});
$(document).on("dblclick", ".is-active table tbody tr td", function (cell) {
var filterId = $(cell.target).attr("relevant-filter-id");
$(filterId).val($(cell.target).text());
});
function loadAndDisplayData(treesToUpdate, includeSearch=true) {