Skip to content

Commit

Permalink
#1080. removing console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ceciliazaragoza committed Oct 25, 2024
1 parent 575fa73 commit 793dea1
Showing 1 changed file with 19 additions and 28 deletions.
47 changes: 19 additions & 28 deletions web-client/public/js/graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -1076,15 +1076,9 @@ export var drawGraph = function (workbook) {
return partialSum + currentValue;
}, 0);
avgs.push(sum / length);
console.log("hellooo")
});
console.log("GET EXPRESSION DATA1", {
data: avgs,
timePoints: uniqueTimePoints,
});
return {data: avgs, timePoints: uniqueTimePoints};
}
console.log("GET EXPRESSION DATA2", {data: strainData.data[gene], timePoints: strainData.timePoints})
return {data: strainData.data[gene], timePoints: strainData.timePoints};
};

Expand Down Expand Up @@ -1536,24 +1530,21 @@ export var drawGraph = function (workbook) {
try {
node.attr("x", function (d) {
var selfReferringEdge = getSelfReferringEdge(d);

var selfReferringEdgeWidth = (selfReferringEdge ? getSelfReferringRadius(selfReferringEdge) +
selfReferringEdge.strokeWidth + 2 : 0);
var rightBoundary = width - (d.textWidth + OFFSET_VALUE) - BOUNDARY_MARGIN - selfReferringEdgeWidth;
if (!adaptive) {
rightBoundary =
-xTranslation / graphZoom +
BOUNDARY_MARGIN / 2 +
width / graphZoom -
BOUNDARY_MARGIN -
(d.textWidth + OFFSET_VALUE) -
selfReferringEdgeWidth;
}
// if (!adaptive) {
// rightBoundary =
// -xTranslation / graphZoom +
// BOUNDARY_MARGIN / 2 +
// width / graphZoom -
// BOUNDARY_MARGIN -
// (d.textWidth + OFFSET_VALUE) -
// selfReferringEdgeWidth;
// }
// currentXPos bounds the graph when toggle to !adaptive and moves each of the nodes to be in bounds
var currentXPos = Math.max(getLeftXBoundaryMargin(), Math.min(rightBoundary, d.x));
if (

width < MAX_WIDTH &&
if (width < MAX_WIDTH &&
(currentXPos === getLeftXBoundaryMargin() ||
currentXPos === rightBoundary)
) {
Expand All @@ -1580,15 +1571,15 @@ export var drawGraph = function (workbook) {
var selfReferringEdgeHeight = (selfReferringEdge ? getSelfReferringRadius(selfReferringEdge) +
selfReferringEdge.strokeWidth + SELF_REFERRING_Y_OFFSET + 0.5 : 0);
var bottomBoundary = height - nodeHeight - BOUNDARY_MARGIN - selfReferringEdgeHeight;
if (!adaptive) {
bottomBoundary =
-yTranslation / graphZoom +
BOUNDARY_MARGIN / 2 +
height / graphZoom -
BOUNDARY_MARGIN -
nodeHeight -
selfReferringEdgeHeight;
}
// if (!adaptive) {
// bottomBoundary =
// -yTranslation / graphZoom +
// BOUNDARY_MARGIN / 2 +
// height / graphZoom -
// BOUNDARY_MARGIN -
// nodeHeight -
// selfReferringEdgeHeight;
// }
// currentYPos bounds the graph when toggle to !adaptive and moves each of the nodes to be in bounds
var currentYPos = Math.max(getTopYBoundaryMargin(), Math.min(bottomBoundary, d.y));

Expand Down

0 comments on commit 793dea1

Please sign in to comment.