From bb41c52030757fb2cf861b6e967638b9554f1c30 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 20 Feb 2018 14:10:19 +0100 Subject: [PATCH] cursorCacheInProgress --- .vs/AAOlivia-Plotter/v15/.suo | Bin 16896 -> 17920 bytes Candlestick.js | 11 +++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.vs/AAOlivia-Plotter/v15/.suo b/.vs/AAOlivia-Plotter/v15/.suo index 299a4f30bac7d46ebc9afd3c02596aabad995a48..dae2004e8fac27cf25ea0b1e535dfde861466d31 100644 GIT binary patch delta 100 zcmZo@VQlDOoM0f!!~g{X3=AwlCL<94`~UwxNR)Z9BZvLQgc8P0OgSv93UR&4KAQ{K k`mHzFDKbiGf>eNk)&W-_%?rdlK+HT@(6Mdv0ec4~01AW@I{*Lx delta 61 zcmZqZVQgq&oM0f!00ROH41z#5BM|@l|NlQom~pZrhyBKc62?tTIV`LRR=?JHZ!To( Gw*~-*y$@Lc diff --git a/Candlestick.js b/Candlestick.js index a1dcadf67..9d6fa8b91 100644 --- a/Candlestick.js +++ b/Candlestick.js @@ -37,6 +37,8 @@ function initialize(pExchange, pMarket, pDatetime, pTimePeriod, chartLayersPanel, callBackFunction) { + let cursorCacheInProgress = false; + datetime = pDatetime; timePeriod = pTimePeriod; @@ -58,9 +60,14 @@ function initializeFileCursorCache() { - fileCursorCache = newFileCursorCache(); - fileCursorCache.initialize("AAMasters", "AAOlivia", "Daily Candles", "Daily Candlesticks", pExchange, pMarket, pDatetime, onFileCursorReady); + if (cursorCacheInProgress === false) { + cursorCacheInProgress = true; + + fileCursorCache = newFileCursorCache(); + fileCursorCache.initialize("AAMasters", "AAOlivia", "Daily Candles", "Daily Candlesticks", pExchange, pMarket, pDatetime, onFileCursorReady); + + } } function onFileCursorReady() {