Prevent unnecessary layoutManager update when toggling enlargement

This commit is contained in:
Erik Ziegler committed 2016-08-10 10:56:44 +02:00
1 parent 131fe7ff99
commit 2dbeea31a0
1 file changed
+5 -1
+5 -1
View File
@@ -213,7 +213,11 @@ LayoutManager = class LayoutManager {
if (this.isZoomed) {
this.resetPreviousLayout();
} else {
this.enlargeViewport(viewportIndex);
// Don't enlarge the viewport if we only have one Viewport
// to begin with
if (this.getNumberOfViewports() > 1) {
this.enlargeViewport(viewportIndex);
}
}
}
};