Skip to content
Snippets Groups Projects

issues that were discovered during biohackathon 2019 in Paris

Merged Piotr Gawron requested to merge wikipathways-issues into master
3 files
+ 73
37
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -427,8 +427,14 @@ public class ApplySimpleLayoutModelCommand extends ApplyLayoutModelCommand {
}
protected Dimension2D estimateDimension(Collection<BioEntity> bioEntites) {
double suggestedSize = Math.max(100 * bioEntites.size() / 4,
Math.sqrt((SPECIES_WIDTH + 10) * (SPECIES_HEIGHT + 10) * bioEntites.size()));
int elementsCount = 0;
for (BioEntity bioEntity : bioEntites) {
if (bioEntity instanceof Element) {
elementsCount++;
}
}
double suggestedSize = Math.max(100 * elementsCount,
Math.sqrt((SPECIES_WIDTH + 10) * (SPECIES_HEIGHT + 10) * elementsCount));
if (bioEntites.size() > 0) {
suggestedSize = Math.max(suggestedSize, 2 * (SPECIES_WIDTH + 10));
}
Loading