Working from the PlayStop Button

This commit is contained in:
Luis Fernando Molina committed 2018-05-31 17:57:42 +02:00
1 parent bc0b35732f
commit fee5f31bef
9 files changed
+201 -40

No files matched your search

+14 -3
View File
@@ -101,8 +101,19 @@ function newTimeControlPanel() {
viewPort.eventHandler.listenToEvent("Zoom Changed", onZoomChanged);
PLAY_STEP = INITIAL_TIME_PERIOD;
/* Here we will listen to the event when time was changed due to a Bot Execution. */
canvas.topSpace.playStopButton.container.eventHandler.listenToEvent("Bot Execution Changed Datetime", onBotChangedTime);
canvas.topSpace.playStopButton.setDatetime(datetime);
}
function onBotChangedTime(pNewDatetime) {
let newDatetime = new Date(pNewDatetime);
thisObject.container.eventHandler.raiseEvent("Datetime Changed", newDatetime);
}
function getContainer(point) {
@@ -148,10 +159,10 @@ function newTimeControlPanel() {
}
function setDatetime(newDatetime) {
thisObject.datetimeDisplay.currentDatetime = newDatetime;
function setDatetime(pDatetime) {
thisObject.datetimeDisplay.currentDatetime = new Date(pDatetime);
canvas.topSpace.playStopButton.setDatetime(pDatetime);
}