From 1ee01953578e5d4ed7ae3c35c27398cf35bfd849 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 27 Jun 2019 20:03:31 +0200 Subject: [PATCH] formatting --- Candles.js | 13 ++++++++----- Volumes.js | 11 +++++++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/Candles.js b/Candles.js index b9732c8ed..c5fef30d0 100644 --- a/Candles.js +++ b/Candles.js @@ -17,11 +17,11 @@ setTimePeriod: setTimePeriod, setDatetime: setDatetime, draw: draw, - recalculateScale: recalculateScale, + recalculateScale: recalculateScale, /* Events declared outside the plotter. */ - onDailyFileLoaded: onDailyFileLoaded, + onDailyFileLoaded: onDailyFileLoaded, // Secondary functions and properties. @@ -226,7 +226,7 @@ /* Now we calculate which candle has this new time, because it will give us the y coordinate. */ let candleFound = false; - let lastClose; + let lastClose; for (let i = 0; i < candles.length; i++) { @@ -668,9 +668,10 @@ if (userPositionDate >= candle.begin && userPositionDate <= candle.end) { browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', 1)'; // Current candle accroding to time - } + } browserCanvasContext.lineWidth = 1; + browserCanvasContext.setLineDash([0, 0]) browserCanvasContext.stroke(); browserCanvasContext.beginPath(); @@ -707,7 +708,7 @@ }; thisObject.container.eventHandler.raiseEvent("Current Candle Changed", currentCandle); } - + if ( candlePoint1.x < viewPort.visibleArea.topLeft.x + 50 || @@ -719,6 +720,7 @@ } browserCanvasContext.lineWidth = 1; + browserCanvasContext.setLineDash([0, 0]) browserCanvasContext.stroke(); @@ -771,3 +773,4 @@ } } + diff --git a/Volumes.js b/Volumes.js index a91dc0407..7420a8c8d 100644 --- a/Volumes.js +++ b/Volumes.js @@ -10,7 +10,7 @@ /* Events declared outside the plotter. */ - onDailyFileLoaded: onDailyFileLoaded, + onDailyFileLoaded: onDailyFileLoaded, // Main functions and properties. @@ -20,7 +20,7 @@ getContainer: getContainer, setTimePeriod: setTimePeriod, setDatetime: setDatetime, - recalculateScale: recalculateScale, + recalculateScale: recalculateScale, draw: draw }; @@ -718,11 +718,12 @@ if (userPositionDate >= volume.begin && userPositionDate <= volume.end) { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', 0.40)'; // Current bar accroding to time - } + } browserCanvasContext.fill(); browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.PATINATED_TURQUOISE + ', 0.40)'; browserCanvasContext.lineWidth = 1; + browserCanvasContext.setLineDash([0, 0]) browserCanvasContext.stroke(); @@ -739,12 +740,13 @@ if (userPositionDate >= volume.begin && userPositionDate <= volume.end) { browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', 0.40)'; // Current volume accroding to time - } + } browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.RED + ', 0.40)'; browserCanvasContext.fill(); browserCanvasContext.lineWidth = 1; + browserCanvasContext.setLineDash([0, 0]) browserCanvasContext.stroke(); if (userPositionDate >= volume.begin && userPositionDate <= volume.end) { @@ -829,3 +831,4 @@ } } +