Skip to content

Commit

Permalink
Merge branch 'ui-v2' of github.com:IGS/gEAR into ui-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jorvis committed Jan 20, 2024
2 parents bbde94e + c6c9d13 commit 8fcc5b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 28 deletions.
15 changes: 7 additions & 8 deletions www/js/classes/tilegrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TileGrid {
this.layout = []; // this.getLayout();

this.maxCols = 12 // highest number of columns in a row
this.maxRows = 12 // highest number of rows in a column
this.maxRows = 3 // highest number of rows in a column

this.tiles = [];
this.tilegrid = [] // this.generateTileGrid();
Expand Down Expand Up @@ -135,7 +135,7 @@ class TileGrid {
const width = datasetTile.tile.width;
const height = datasetTile.tile.height;

if (width === 12) {
if (width === this.maxCols) {
// tile spans the entire row
const tileRow = [];
tileRow.push(datasetTile);
Expand All @@ -149,7 +149,7 @@ class TileGrid {
datasetTile.used = true;
const usedTiles = [datasetTile];

let remainingWidth = 12 - width;
let remainingWidth = this.maxCols - width;

// find tiles that fit into the remaining width
while (remainingWidth > 0) {
Expand Down Expand Up @@ -344,7 +344,8 @@ class DatasetTile {
display.plotly_config.gene_symbol = geneSymbol;
}
const cardContent = document.querySelector(`#tile_${this.tile.tile_id} .card-image`);
cardContent.classList.add("loader");
// TODO: this breaks things... change loader
//cardContent.classList.add("loader");

try {
// TODO: Add Epiviz
Expand Down Expand Up @@ -374,7 +375,7 @@ class DatasetTile {
errorMessage.textContent = error.message;
cardContent.append(errorMessage);
} finally {
cardContent.classList.remove("loader");
//cardContent.classList.remove("loader");
}

}
Expand Down Expand Up @@ -468,7 +469,6 @@ class DatasetTile {
Plotly.newPlot(plotlyPreview.id, plotJson.data, plotJson.layout, custonConfig);
const custonLayout = getPlotlyDisplayUpdates(expressionDisplayConf, this.plotType, "layout")
Plotly.relayout(plotlyPreview.id, custonLayout)

}

async renderScanpyDisplay(display) {
Expand Down Expand Up @@ -788,9 +788,8 @@ const drawLegend = (data, plotConfig, datasetTile, score) => {
.attr('stop-color', highColor);
}

//const// { width } = node.getBoundingClientRect();
const width = card.getBoundingClientRect().width;
console.log(width);

// Draw the rectangle using the linear gradient
legend
.append('rect')
Expand Down
20 changes: 0 additions & 20 deletions www/js/plot_display_config.v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,26 +157,6 @@ const postPlotlyConfig = {
b: 10
}
}
}, {
plot_type: "violin"
, layout:{
margin: {
t: 30
, r: 10
}
}
}, {
plot_type: "bar"
, layout:{
margin: {
t: 30
, r: 10
}
/* , legend: {
orientation: "h"
}
*/
}
}
]
, curator: [
Expand Down

0 comments on commit 8fcc5b5

Please sign in to comment.