Skip to content

Commit 53bfc8b

Browse files
committed
Fixed bug
1 parent 2dcf7bb commit 53bfc8b

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

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

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

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-
112+
width = Math.log(Math.max(segmentLength - 9, 1)) / Math.log(1.15) * 10 + Math.min(10 * segmentLength, 100);
113+
122114
height = NODE_HEIGHT;
123115

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

0 commit comments

Comments
 (0)