| FoxitPDFSDKforWeb v11.0.5 Archives Foxit PDF SDK for Web

Static Public Member Functions | List of all members
DivScrollWrap Class Reference
PDFViewCtrl

A basic class to create custom ScrollWrap with specified element. More...

Inheritance diagram for DivScrollWrap:

## Static Public Member Functions
static | create (wrapperElement)
| Create a subclass of DivScrollWrap with specified element which should be used to render PDFViewer, and the width, height and overflow property of this element must be defined via CSS. More...

## Additional Inherited Members
Public Member Functions inherited from ScrollWrap
| getHeight ()
| Gets the height of the view. More...
| getScrollHost ()
| Gets the host of the scroll bar that needs to be listened to for scroll events. . More...
| getScrollLeft ()
| Viewer's scroll bar left value. More...
| getScrollOffsetLeft ()
| Viewer relative to the left of the scroll hosts. More...
| getScrollOffsetTop ()
| Viewer relative to the top of the scroll hosts. More...
| getScrollTop ()
| Viewer's scroll bar top value. More...
| getScrollX ()
| Gets the value of the horizontal scroll bar. More...
| getScrollY ()
| Gets the value of the vertical scroll bar. More...
| getWidth ()
| Holds the width of the view. More...
| scrollBy (x, y)
| Scroll to relative position. More...
| scrollTo (x, y)
| Scroll to position. More...
Public Member Functions inherited from Disposable
| addDestroyHook (...hooks)
| Add a function to destroyHooks list, which will be called during destroy. More...
| destroy ()
| ownsTo (owner)
| Establishes an ownership relationship where this instance will be destroyed when the owner is destroyed. Additionally, the owner will be automatically removed from the destroyHooks list when this instance is destroyed. More...

## Detailed Description

A basic class to create custom ScrollWrap with specified element.

// This object can be called when PDFViewer is wrapped in a scrollable DOM with predefined dimensions-height and width.
// html
<div style="width: 100%; height: 600px; overflow: auto;"><div id="pdf-viewer"></div></div>
// script
var pdfViewer = new PDFViewer({
...,
customs: {
ScrollWrap: PDFViewCtrl.DivScrollWrap
}
})
pdfViewer.init('#pdf-viewer');

See also
  PDFViewer.constructor

Since
  7.6.0

## Member Function Documentation

## ◆ create()

static DivScrollWrap::create | ( |  | wrapperElement | ) |
| inline static

Create a subclass of DivScrollWrap with specified element which should be used to render PDFViewer, and the width, height and overflow property of this element must be defined via CSS.

Parameters

  wrapperElement | HTMLElement

See also
  PDFViewer.init

Returns
  new(viewerRender:any,scrollHost:HTMLElement)=>DivScrollWrap -

Since
  7.3.0

@2025 Foxit Software Incorporated. All rights reserved.