docs: function () {
              var state = this.state,
                  zoomState = state.zoomState,
                  zoom = zoomState.zoom,
                  page = this.currentPage || 1,
                  currentPage = state.pages[page - 1],
                  secondPage = this.twoPageMode ? state.pages[page] : currentPage,
                  viewportWidth = state.viewportDimensions.clientWidth,
                  viewportHeight = state.viewportDimensions.clientHeight,
                  secondPageWidth,
                  currentPageWidth,
                  currentPageHeight,
                  zoomedWidth, zoomedHeight,
                  docWidth, docHeight;
  
              secondPageWidth = secondPage.actualWidth;
              currentPageWidth = currentPage.actualWidth + (this.twoPageMode ? secondPageWidth : 0);
              currentPageHeight = currentPage.actualHeight;
  
              zoomedWidth = Math.floor((currentPageWidth + currentPage.paddingLeft + secondPage.paddingRight) * zoom);
              zoomedHeight = Math.floor((currentPage.totalActualHeight) * zoom);
  
              docWidth = Math.max(zoomedWidth, viewportWidth);
              docHeight = Math.max(zoomedHeight, viewportHeight);
  
              this.$doc.css({
                  width: docWidth,
                  height: docHeight
              });
  
              this.updatePageMargins();
  
              if (docWidth > viewportWidth || docHeight > viewportHeight) {
                  this.$el.addClass('crocodoc-scrollable');
              } else {
                  this.$el.removeClass('crocodoc-scrollable');
              }
          }