ALBAÑILERIA | PDF | Fundación (Ingeniería) | Ladrillo-1&&e.indexOf("safari/")>-1&&-1===e.indexOf("chrome/")}();class o{constructor(){}name(){return this._name}register(e,t){if(this.registered)throw Error("This ViewManager is already registered");this.registered=!0,this.documentManager=e,this.viewportManager=t,this._currentPageWidth=window.defaultViewWidth,this._currentZoomMultiplier=1,this._updatePageWidths();const i=this.documentManager.firstVisiblePage;this._register(e,t),i&&this.documentManager.gotoPage(i.pageNum,{}),e.executeCallbacks()}_zoomedPageWidth(){return this._currentPageWidth*this._currentZoomMultiplier}_updatePageWidths(){this.documentManager.setPageWidths(this._zoomedPageWidth())}isTopPageInView(){return!0}_register(e,t){}unregister(){if(!this.registered)throw Error("This ViewManager is already unregistered");this.isFullscreen&&this.exitFullscreen(),this._setBodyWidth(),this._unregister(),this.registered=!1,delete this.documentManager,delete this.viewportManager}_unregister(){}_pagingStep(){return 1}gotoPage(e,t){if(!this.registered)throw Error("ViewManager must be registerd to call gotoPage");this._gotoPage(e,t)}_gotoPage(e,t){}_fireHideExtras(){this.documentManager._fireHideExtras(),this._extrasHidden=!0}_fireShowExtras(){this.documentManager._fireShowExtras(),this._extrasHidden=!1}enterFullscreen(){if(this.isFullscreen)throw Error("Fullscreen is already set");this._setBodyWidth(),this.viewportManager.addEvent("resize",this._fullscreenResizedCallback),this._fireHideExtras(),this.resetZoom(),this._enterFullscreen(),this._fullscreenResized(this.viewportManager.viewRect),this._currentPageWidth=this.viewportManager.viewRect.width,this.isFullscreen=!0;const e=this.documentManager.firstVisiblePage;e&&this.documentManager.gotoPage(e.pageNum,{}),this.documentManager._fireEnteredFullscreen()}exitFullscreen(){if(!this.isFullscreen)throw Error("Fullscreen is not set");this.viewportManager.removeEvent("resize",this._fullscreenResizedCallback),this._fireShowExtras(),this.resetZoom(),this._exitFullscreen(),this.isFullscreen=!1;const e=this.documentManager.firstVisiblePage;e&&this.documentManager.gotoPage(e.pageNum,{}),this.documentManager._fireExitedFullscreen()}_viewBarWidth(){return this._extrasHidden?0:this.documentManager.options.extrasWidth}_enterFullscreen(){}_exitFullscreen(){}_fullscreenResized(e){}_scrollWithZoom(e,t){window.scrollTo(0,e.top*t)}zoom(e){const t=this.viewportManager.viewRect;t&&(this._currentZoomMultiplier*=e,this._setBodyWidth(),this._updatePageWidths(),this.documentManager.setIsScrolling(!0),this._scrollWithZoom(t,e),this._zoomed(),this.documentManager.setIsScrolling(!1),this.documentManager._fireZoomed(e))}_zoomed(){}resetZoom(){this._currentZoomMultiplier=1,this._setBodyWidth(),this._updatePageWidths(),this._zoomed()}_setBodyWidth(){if(window.DocumentManager.scrollParent)return;if(!1===window.DocumentManager.updateBodyWidth)return;const e=document.documentElement.clientWidth,t=this._zoomedPageWidth()+this._viewBarWidth()+10,i=document.getElementById("global_header");t>e?(document.body.style.width=`${t}px`,i&&(i.style.width=`${e}px`)):(document.body.style.width="100%",i&&(i.style.width="100%"))}}class l extends o{constructor(){super(),this._name="scroll",this._verticalPositionChangeCallback=()=>{this.checkAndUpdateVisiblePages()},this._fullscreenResizedCallback=()=>{this._fullscreenResized()},this.shouldRestorePosition=!0}_updateInViewport(e){const t=this.viewportManager.viewRect,i=e.boundingRect,s=e.isVisible;return...
Comentarios recientes