Skip to content

Commit 2dcf7bb

Browse files
authored
Merge branch 'develop' into minimap
2 parents 3707ca5 + 0be4617 commit 2dcf7bb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/main/java/programminglife/model/drawing/DrawableSegment.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,16 @@ public void setDrawDimensions(double zoomLevel) {
109109
int segmentLength = this.getSequenceLength();
110110
double width, height;
111111

112-
width = 10 + Math.pow(segmentLength, 1.0 / 2);
112+
113+
//VERSION 1
114+
// double minValue = min(10 * segmentLength, 100);
115+
// width = minValue + Math.pow(segmentLength * minValue, 1.0 / 2);
116+
117+
//VERSION 2
118+
width = Math.log(Math.max(segmentLength - 9, 1)) / Math.log(1.15) * 10 + min(10 * segmentLength, 100);
119+
120+
// width = 10 + Math.pow(segmentLength, 1.0 / 2);
121+
113122
height = NODE_HEIGHT;
114123

115124
this.setSize(width * zoomLevel, height * zoomLevel);

0 commit comments

Comments
 (0)