From e7d6ad597f947f9cd95a5ed6353ced4b1de8bb6e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 20 Feb 2018 14:13:51 +0100 Subject: [PATCH] finaleStepsInProgress --- .vs/AAOlivia-Plotter/v15/.suo | Bin 17920 -> 16896 bytes Candlestick.js | 22 ++++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.vs/AAOlivia-Plotter/v15/.suo b/.vs/AAOlivia-Plotter/v15/.suo index dae2004e8fac27cf25ea0b1e535dfde861466d31..eb0b90762c6d7714f68c589cefe6450063f7f41e 100644 GIT binary patch delta 94 zcmZqZVQgq&oM0f!00ROH41z#5BM|@l|NlQom~pZrhyBKc62?hPxhzTk3w$;gGHtMt b^asg7K{${$1!5i`W}YnQ*tYqAy#o^fj9e1M delta 133 zcmZo@VQlDOoM0f!!~g{X3=AwlCL<94`~UwxNR)Z9BZvLQgc8O{Ot~z#=I{63T*$P+ tM$!l*2L%yOng>WTPZo4++kC*@foYSSBBP`xObvt90aqZK7l=`n0Ra2(8BYKJ diff --git a/Candlestick.js b/Candlestick.js index 9d6fa8b91..e45fca047 100644 --- a/Candlestick.js +++ b/Candlestick.js @@ -38,6 +38,7 @@ function initialize(pExchange, pMarket, pDatetime, pTimePeriod, chartLayersPanel, callBackFunction) { let cursorCacheInProgress = false; + let finaleStepsInProgress = false; datetime = pDatetime; timePeriod = pTimePeriod; @@ -82,20 +83,25 @@ if (dailyFile !== undefined) { - fileCursor = newFileCursor; + if (finaleStepsInProgress === false) { - recalculateScale(); // With any of the market files we can calculate the scale. + finaleStepsInProgress = true; - layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.OLIVIA_CANDLES); + fileCursor = newFileCursor; - recalculateCandles(); - postitionViewPort(); + recalculateScale(); // With any of the market files we can calculate the scale. - viewPort.eventHandler.listenToEvent("Zoom Changed", onZoomChanged); - canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished); + layerStatus = chartLayersPanel.getLayerStatus(chartLayersPanel.layerNames.OLIVIA_CANDLES); - callBackFunction(); + recalculateCandles(); + postitionViewPort(); + viewPort.eventHandler.listenToEvent("Zoom Changed", onZoomChanged); + canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished); + + callBackFunction(); + + } } }