diff --git a/src/navigator.js b/src/navigator.js index bb4e08d6..4b2018fb 100644 --- a/src/navigator.js +++ b/src/navigator.js @@ -284,7 +284,7 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /* setFlip: function(state) { this.viewport.setFlip(state); - var flip = ((this.viewport.getFlip() && !this.viewer.world._items[0].getFlip()) || (!this.viewport.getFlip() && this.viewer.world._items[0].getFlip())); + var flip = ((this.viewport.getFlip() && this.viewer.world._items[0] && !this.viewer.world._items[0].getFlip()) || (!this.viewport.getFlip() && this.viewer.world._items[0] && this.viewer.world._items[0].getFlip())); this.setDisplayTransform(flip ? "scale(-1,1)" : "scale(1,1)"); return this; }, diff --git a/src/viewer.js b/src/viewer.js index f622829c..ac3701b4 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -3367,7 +3367,7 @@ function updateOnce( viewer ) { THIS[ viewer.hash ].animating = animated; // Update navigator flip transformation - if (viewer.navigator && viewer.viewport != "undefined"){ + if (viewer.navigator && viewer.viewport != undefined){ viewer.navigator.setFlip(viewer.viewport.getFlip()); } //viewer.profiler.endUpdate();