diff --git a/www/js/state.js b/www/js/state.js index e2fc01c..350d36e 100644 --- a/www/js/state.js +++ b/www/js/state.js @@ -35,6 +35,10 @@ State.BACK_BUTTON = document.querySelector('#navigation .back'); State.prototype.push = function (elem) { if (!elem) return; + if (elem.cloneMarkers) { + elem.markers = this.current().markers; + } + this.stack.push(elem); return this.render(); }; diff --git a/www/js/tour.js b/www/js/tour.js index cb3e2a0..813a139 100644 --- a/www/js/tour.js +++ b/www/js/tour.js @@ -20,7 +20,11 @@ Tour.prototype.start = function () { this.isRunning = true; Tour.CONTROL_VIEW.classList.remove('hidden'); - this.state.push({ view: '', navigationText: 'End Tour' }); + this.state.push({ + view: '', + navigationText: 'End Tour', + cloneMarkers: true + }); }; Tour.prototype.visit = function () {