onPagePreviewReady_(pageIndex, previewUid, previewResponseId) {
      if (this.inFlightRequestId_ != previewResponseId) {
        return;  // Ignore old response.
      }
      const pageNumber = pageIndex + 1;
      const pageNumberSet = this.printTicketStore_.pageRange.getPageNumberSet();
      if (pageNumberSet.hasPageNumber(pageNumber)) {
        const previewIndex = pageNumberSet.getPageNumberIndex(pageNumber);
        if (previewIndex == 0) {
          this.dispatchPreviewStartEvent_(previewUid, pageIndex);
        }
        this.dispatchPageReadyEvent_(previewIndex, pageNumber, previewUid);
      }
    }
/**
     * Called when a page's preview has been generated. Dispatches a
     * PAGE_READY event.
     * @param {number} pageIndex The index of the page whose preview is ready.
     * @param {number} previewUid The unique ID of the print preview UI.
     * @param {number} previewResponseId The preview request ID that this page
     *     preview is a response to.
     * @private
     */
Called when a page's preview has been generated. Dispatches a
PAGE_READY event.
@param {number} pageIndex The index of the page whose preview is ready.
@param {number} previewUid The unique ID of the print preview UI.
@param {number} previewResponseId The preview request ID that this page
preview is a response to.
@private
Called when a page ' s preview has been generated . Dispatches a PAGE_READY event . @param { number } pageIndex The index of the page whose preview is ready . @param { number } previewUid The unique ID of the print preview UI . @param { number } previewResponseId The preview request ID that this page preview is a response to . @private
onPagePreviewReady_(pageIndex, previewUid, previewResponseId) {
      if (this.inFlightRequestId_ != previewResponseId) {
        return;  
      }
      const pageNumber = pageIndex + 1;
      const pageNumberSet = this.printTicketStore_.pageRange.getPageNumberSet();
      if (pageNumberSet.hasPageNumber(pageNumber)) {
        const previewIndex = pageNumberSet.getPageNumberIndex(pageNumber);
        if (previewIndex == 0) {
          this.dispatchPreviewStartEvent_(previewUid, pageIndex);
        }
        this.dispatchPageReadyEvent_(previewIndex, pageNumber, previewUid);
      }
    }
onPagePreviewReady_ ( pageIndex , previewUid , previewResponseId ) { if ( this . inFlightRequestId_ != previewResponseId ) { return ; } const pageNumber = pageIndex + 1 ; const pageNumberSet = this . printTicketStore_ . pageRange . getPageNumberSet ( ) ; if ( pageNumberSet . hasPageNumber ( pageNumber ) ) { const previewIndex = pageNumberSet . getPageNumberIndex ( pageNumber ) ; if ( previewIndex == 0 ) { this . dispatchPreviewStartEvent_ ( previewUid , pageIndex ) ; } this . dispatchPageReadyEvent_ ( previewIndex , pageNumber , previewUid ) ; } }
Called when a page's preview has been generated.
Called when a page ' s preview has been generated .
// Ignore old response.