Home | History | Annotate | Download | only in pdf

Lines Matching refs:page

29  * @param {number} scrollbarWidth the width of scrollbars on the page
54 * Enumeration of page fitting types.
59 FIT_TO_PAGE: 'fit-to-page',
64 * The increment to scroll a page by in pixels when up/down/left/right arrow
88 * The width of the page shadow around pages in pixels.
266 * @param {integer} y the y-coordinate to get the page at.
267 * @return {integer} the index of a page overlapping the given y-coordinate.
273 var page = Math.floor(min + ((max - min) / 2));
275 // of the previous page as the top for finding the page.
277 if (page > 0) {
278 top = this.pageDimensions_[page - 1].y +
279 this.pageDimensions_[page - 1].height;
281 var bottom = this.pageDimensions_[page].y +
282 this.pageDimensions_[page].height;
285 return page;
287 max = page - 1;
289 min = page + 1;
295 * Returns the page with the most pixels in the current viewport.
296 * @return {int} the index of the most visible page.
310 // If we hit a page with 0 area overlap, we must have gone past the
324 * Compute the zoom level for fit-to-page or fit-to-width. |pageDimensions| is
325 * the dimensions for a given page and if |widthOnly| is true, it indicates
326 * that fit-to-page zoom should be computed rather than fit-to-page.
327 * @param {Object} pageDimensions the dimensions of a given page
328 * @param {boolean} widthOnly a bool indicating whether fit-to-page or
387 * Zoom the viewport so that the page-width consumes the entire viewport.
396 // When computing fit-to-width, the maximum width of a page in the
400 var page = this.getMostVisiblePage();
407 * Zoom the viewport so that a page consumes the entire viewport. Also scrolls
408 * to the top of the most visible page.
415 var page = this.getMostVisiblePage();
417 this.pageDimensions_[page], false));
418 // Center the document in the page by scrolling by the amount of empty
421 (this.documentDimensions_.width - this.pageDimensions_[page].width) *
424 this.pageDimensions_[page].y * this.zoom_);
462 * Go to the given page index.
463 * @param {number} page the index of the page to go to. zero-based.
465 goToPage: function(page) {
469 if (page < 0)
470 page = 0;
471 if (page >= this.pageDimensions_.length)
472 page = this.pageDimensions_.length - 1;
473 var dimensions = this.pageDimensions_[page];
502 * Get the coordinates of the pagepage shadow)
504 * @param {number} page the index of the page to get the rect for.
505 * @return {Object} a rect representing the page in screen coordinates.
507 getPageScreenRect: function(page) {
516 if (page >= this.pageDimensions_.length)
517 page = this.pageDimensions_.length - 1;
519 var pageDimensions = this.pageDimensions_[page];
521 // Compute the page dimensions minus the shadows.
531 // Compute the x-coordinate of the page within the document.
533 // page coordinates, but it isn't yet.