Browse Source

Fixes text-selection example

Yury Delendik 11 years ago
parent
commit
e8af56ffc5
  1. 3
      web/page_view.js
  2. 4
      web/text_layer_builder.js
  3. 2
      web/viewer.js

3
web/page_view.js

@ -561,7 +561,8 @@ var PageView = function pageView(container, id, scale,
pageIndex: this.id - 1, pageIndex: this.id - 1,
lastScrollSource: PDFView, lastScrollSource: PDFView,
viewport: this.viewport, viewport: this.viewport,
isViewerInPresentationMode: PresentationMode.active isViewerInPresentationMode: PresentationMode.active,
findController: PDFView.findController
}) : null; }) : null;
// TODO(mack): use data attributes to store these // TODO(mack): use data attributes to store these
ctx._scaleX = outputScale.sx; ctx._scaleX = outputScale.sx;

4
web/text_layer_builder.js

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals PDFView, CustomStyle, scrollIntoView, PDFJS */ /* globals CustomStyle, scrollIntoView, PDFJS */
'use strict'; 'use strict';
@ -39,7 +39,7 @@ var TextLayerBuilder = (function TextLayerBuilderClosure() {
this.viewport = options.viewport; this.viewport = options.viewport;
this.isViewerInPresentationMode = options.isViewerInPresentationMode; this.isViewerInPresentationMode = options.isViewerInPresentationMode;
this.textDivs = []; this.textDivs = [];
this.findController = PDFView.findController || null; this.findController = options.findController || null;
} }
TextLayerBuilder.prototype = { TextLayerBuilder.prototype = {

2
web/viewer.js

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals PDFJS, PDFBug, FirefoxCom, Stats, Cache, CustomStyle, ProgressBar, /* globals PDFJS, PDFBug, FirefoxCom, Stats, Cache, ProgressBar,
DownloadManager, getFileName, scrollIntoView, getPDFFileNameFromURL, DownloadManager, getFileName, scrollIntoView, getPDFFileNameFromURL,
PDFHistory, Preferences, SidebarView, ViewHistory, PageView, PDFHistory, Preferences, SidebarView, ViewHistory, PageView,
ThumbnailView, URL, noContextMenuHandler, SecondaryToolbar, ThumbnailView, URL, noContextMenuHandler, SecondaryToolbar,

Loading…
Cancel
Save