We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cc0f83f + 80873ef commit cbea7a6Copy full SHA for cbea7a6
1 file changed
viewer/viewer.js
@@ -284,11 +284,11 @@ function drawCourse() {
284
var overviewWidth = overviewPitch*(course.width+1);
285
// The rest of the space is used by the magnified display
286
fieldWidth = svgWidth-overviewWidth-2*xmargin;
287
- mag = fieldWidth/course.width;
+ mag = Math.min(64, Math.min(fieldWidth/course.width, svgHeight/11));
288
field = document.createElementNS(ns, 'svg');
289
field.setAttribute('height', svgHeight);
290
field.setAttribute('width', fieldWidth);
291
- field.setAttribute('x', 0);
+ field.setAttribute('x', Math.max(0, (fieldWidth - (course.width + 1) * mag) / 2 ));
292
field.setAttribute('y', 0);
293
// Draw the course on an SVG group "courseFig"
294
gridDotRadius = mag*gridDotRadiusRatio;
0 commit comments