Namespace: ThumbnailsPanel

UI. ThumbnailsPanel

Methods


<static> disableMultiselect()

Disable multi select in the left thumbnail panel
Example
WebViewer(...)
  .then(function(instance) {
    instance.UI.ThumbnailsPanel.disableMultiselect();
  });

<static> enableMultiselect()

Enable multi select in the left thumbnail panel
Example
WebViewer(...)
  .then(function(instance) {
    instance.UI.ThumbnailsPanel.enableMultiselect();
  });

<static> getSelectedPageNumbers()

Get the currently selected pages
Returns:
an array of select page numbers
Type
Array.<number>
Example
WebViewer(...)
  .then(function(instance) {
    instance.UI.ThumbnailsPanel.getSelectedPageNumbers();
  });

<static> selectPages(pageNumbers)

Select thumbnails in the thumbnail panel. This requires the "ThumbnailMultiselect" feature to be enabled
Parameters:
Name Type Description
pageNumbers Array.<number> array of page numbers to select
Example
WebViewer(...)
  .then(function(instance) {
    instance.UI.enableFeatures(['ThumbnailMultiselect']);

    const pageNumbersToSelect = [1, 2, 3];
    instance.UI.ThumbnailsPanel.selectPages(pageNumbersToSelect);
  });

<static> setThumbnailSelectionMode(thumbnailSelectionMode)

Sets thumbnail selection mode.
Parameters:
Name Type Description
thumbnailSelectionMode string Thumbnail selection mode to set
Properties
Name Type Description
thumbnail string Set selection mode to use entire thumbnail to select a page
checkbox string (default) Set selection mode to use only checkbox to select a page
Example
WebViewer(...)
  .then(function(instance) {
    instance.UI.ThumbnailsPanel.setThumbnailSelectionMode('thumbnail');
  });

<static> unselectPages(pageNumbers)

Unselect selected thumbnails
Parameters:
Name Type Description
pageNumbers Array.<number> array of page numbers to unselect
Example
WebViewer(...)
 .then(function(instance) {
    const pageNumbersToUnselect = [1, 2];
    instance.UI.ThumbnailsPanel.unselectPages(pageNumbersToUnselect);
  });