Improvements on positioning in the timeline when openning the app

Now the app will try to re position itself on the timeline at the last place visited with the same zoom level. This will not be possible only when it is the first time the app is usued or when the screen resolution was changed, in both cases the positionning will be at the current datetime.
This commit is contained in:
Luis Fernando Molina committed 2018-05-15 15:38:47 +02:00
1 parent 6cb6de2c00
commit 07f8795ae6
7 files changed
+211 -83

No files matched your search

+13 -3
View File
@@ -37,7 +37,7 @@ function newTimeMachine() {
return thisObject;
function initialize() {
function initialize(callBackFunction) {
if (INFO_LOG === true) { logger.write("[INFO] initialize -> Entering function."); }
@@ -70,16 +70,26 @@ function newTimeMachine() {
iteration++;
function onDefaultMarketInitialized() {
function onDefaultMarketInitialized(err) {
if (INFO_LOG === true) { logger.write("[INFO] initialize -> onDefaultMarketInitialized -> Entering function."); }
if (err.result !== GLOBAL.DEFAULT_OK_RESPONSE.result) {
if (INFO_LOG === true) { logger.write("[INFO] initialize -> onDefaultMarketInitialized -> Initialization of the only market failed."); }
callBackFunction(err);
return;
}
thisObject.charts.push(timelineChart);
controlPanel.container.eventHandler.listenToEvent('Datetime Changed', timelineChart.setDatetime, undefined);
timelineChart.container.eventHandler.listenToEvent('Datetime Changed', controlPanel.setDatetime);
initializeTheRestOfTheMarkets();
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE);
//initializeTheRestOfTheMarkets();
}