diff --git a/Strategies.js b/Strategies.js index a42d0b823..c522c7a82 100644 --- a/Strategies.js +++ b/Strategies.js @@ -581,8 +581,10 @@ /* Situation Name */ let digit = record.begin.toFixed(0).substring(7,8) let positionY = recordPoint3.y - (recordPoint3.y - recordPoint1.y) / 2 + (Number(digit) * 10 - 50) - if (record.triggerOnSituation !== "My Situation") { - printLabel(record.triggerOnSituation, recordPoint1.x + 5, positionY, '1', 12); + if (canvas.chartingSpace.viewport.zoomLevel >= ZOOM_OUT_THRESHOLD_FOR_HIDDING_CHARTS_LABELS) { + if (record.triggerOnSituation !== "My Situation") { + printLabel(record.triggerOnSituation, recordPoint1.x + 5, positionY, '1', 12); + } } /* Draw the Sticks */ diff --git a/Trades.js b/Trades.js index 1d99ee700..f90c577bc 100644 --- a/Trades.js +++ b/Trades.js @@ -602,11 +602,11 @@ // we do not write any text } else { - printLabel(line0, recordPoint2.x - (recordPoint2.x - recordPoint1.x) / 2 - line1.length * FONT_ASPECT_RATIO, point.y - 15, '1', 12); - printLabel(line1, recordPoint2.x - (recordPoint2.x - recordPoint1.x) / 2 - line1.length * FONT_ASPECT_RATIO, point.y, '1', 12); - printLabel(line2, recordPoint2.x - (recordPoint2.x - recordPoint1.x) / 2 - line2.length * FONT_ASPECT_RATIO, point.y + 15, '1', 12); - - + if (canvas.chartingSpace.viewport.zoomLevel >= ZOOM_OUT_THRESHOLD_FOR_HIDDING_CHARTS_LABELS) { + printLabel(line0, recordPoint2.x - (recordPoint2.x - recordPoint1.x) / 2 - line1.length * FONT_ASPECT_RATIO, point.y - 15, '1', 12); + printLabel(line1, recordPoint2.x - (recordPoint2.x - recordPoint1.x) / 2 - line1.length * FONT_ASPECT_RATIO, point.y, '1', 12); + printLabel(line2, recordPoint2.x - (recordPoint2.x - recordPoint1.x) / 2 - line2.length * FONT_ASPECT_RATIO, point.y + 15, '1', 12); + } } }