Skip to content

Commit

Permalink
web: pivot: drillthrough on dimensions fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrugz committed Sep 6, 2024
1 parent 8f5c6d7 commit 220dacf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions qon-web/src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1457,25 +1457,25 @@
var row = cell.parentNode;
// element.tagName
if(row.getAttribute("measuresrow") && !row.getAttribute("colname")) {
console.log("...clickOnTable row=", row, "tag=", row.tagName, ", is a 'measuresrow'");
console.log("clickOnTable: row=", row, "tag=", row.tagName, ", is a 'measuresrow'");
return;
}
if(cell.getAttribute("measure")) {
console.log("...clickOnTable cell=", cell, "tag=", row.tagName, ", is a 'measure'");
console.log("clickOnTable: cell=", cell, "tag=", row.tagName, ", is a 'measure'");
return;
}
if(cell.tagName != 'TD') {
//var colname = row.getAttribute("colname");
console.log("...clickOnTable cell=", cell, "tag=", cell.tagName, ", not a TD, parentNode.colname = ", row.getAttribute("colname"));
console.debug("...clickOnTable cell=", cell, "tag=", cell.tagName, ", not a TD, parentNode.colname = ", row.getAttribute("colname"));
//return;
}
if(cell.getAttribute("dimoncol") != null) {
// XXX get colname from table header...
console.log("...clickOnTable cell=", cell, "dimoncol=", cell.getAttribute("dimoncol"), ", not a data cell X");
console.debug("...clickOnTable cell=", cell, "dimoncol=", cell.getAttribute("dimoncol"), ", not a data cell X");
//return;
}
if(content.style.cursor != "crosshair") {
console.log("...clickOnTable [not active] cell=", cell, "tag=", cell.tagName);
console.log("clickOnTable: [not active] cell=", cell, "tag=", cell.tagName);
return;
}
/*
Expand Down
5 changes: 3 additions & 2 deletions qon-web/src/main/webapp/js/table-drill.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,10 @@ function getTableDimValues(table, cell) {
rowDimVals = rowDimVals.slice(0, dimRowDimIndex+1);
}
if(rowIndex==null) {
colDimVals = getColDimValues(table, colDimIndex-1);
const diff = getNodeIndex(cell) - colIndex - 1;
colDimVals = getColDimValues(table, colDimIndex-diff);
var dimColDimIndex = getDimColDimIndex(cell);
//console.log("... >> colDimIndex=", colDimIndex, "dimColDimIndex=", dimColDimIndex);
//console.log("... >> colDimIndex=", colDimIndex, "dimColDimIndex=", dimColDimIndex, "diff=", diff);
colDimVals = colDimVals.slice(0, dimColDimIndex);
}
//console.log("... cOT getColDimValues=", colDimVals);
Expand Down

0 comments on commit 220dacf

Please sign in to comment.