diff --git a/CHANGELOG.md b/CHANGELOG.md index 504cd5a47..de1aef401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added pause functionality to Blockrain activity #1501 - Fraction Bounce Activity, trick to cheat the score #1511 - Tooltips not localized in Reflection activity #1508 +- Time fluctuations in Clock Activity #1507 ## [1.7.0] - 2023-03-28 ### Added diff --git a/activities/Clock.activity/js/activity.js b/activities/Clock.activity/js/activity.js index 13fade2ff..f1e0d0db1 100644 --- a/activities/Clock.activity/js/activity.js +++ b/activities/Clock.activity/js/activity.js @@ -303,30 +303,17 @@ define(["sugar-web/activity/activity","sugar-web/env","sugar-web/graphics/radiob Clock.prototype.changeWriteTime = function (writeTime) { - this.writeTime = writeTime; + this.writeTime = writeTime; - if (writeTime) { - this.textTimeElem.style.display = "block"; - } else { - this.textTimeElem.style.display = "none"; - } - - if (this.setTime) { - this.writeTimeInSetTime(); - } - else { - this.updateSizes(); - - var date = new Date(); - var hours = date.getHours(); - var minutes = date.getMinutes(); - var seconds = date.getSeconds(); - this.displayTime(hours, minutes, seconds); + if (writeTime) { + this.textTimeElem.style.display = "block"; + } else { + this.textTimeElem.style.display = "none"; + } - this.drawBackground(); - } + this.writeTimeInSetTime(); - } + } Clock.prototype.changeWriteDate = function (writeDate) { this.writeDate = writeDate;