Skip to content

Commit

Permalink
Fixes #5691
Browse files Browse the repository at this point in the history
  • Loading branch information
hpinkos committed Aug 1, 2017
1 parent 6d6339c commit a6d1767
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
16 changes: 4 additions & 12 deletions Apps/CesiumViewer/CesiumViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,11 @@ define([
history.replaceState(undefined, '', '?' + objectToQuery(endUserOptions));
}

var updateTimer;
var timeout;
if (endUserOptions.saveCamera !== 'false') {
camera.moveStart.addEventListener(function() {
if (!defined(updateTimer)) {
updateTimer = window.setInterval(saveCamera, camera, 1000);
}
});
camera.moveEnd.addEventListener(function() {
if (defined(updateTimer)) {
window.clearInterval(updateTimer);
updateTimer = undefined;
}
saveCamera(camera);
camera.changed.addEventListener(function() {
window.clearTimeout(timeout);
timeout = window.setTimeout(saveCamera, 1000);
});
}

Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Change Log
==========

### 1.37 - 2017-09-01

* Fixed `replaceState` bug that was causing the `CesiumViewer` demo application to crash in Safari and iOS

### 1.36 - 2017-08-01

* Breaking changes
Expand Down

0 comments on commit a6d1767

Please sign in to comment.