Classes
Methods
dispose() → {void}
- Description:
Releases source-owned resources.
- Source:
Returns:
- Type
- void
emit(event, …args) → {void}
- Description:
Emits a source event.
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
event |
string | Event name. |
|
args |
* |
<repeatable> |
Event arguments. |
Returns:
- Type
- void
(abstract) getPageCount() → {number}
- Description:
Returns the number of pages exposed by this source.
- Source:
Returns:
Page count.
- Type
- number
(async, abstract) getPageHighRes(_index, _targetEdgePx) → {Promise.<(CanvasImageSource|null)>}
- Description:
Returns a high-resolution bitmap for a page.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
_index |
number | Page index. |
_targetEdgePx |
number | Requested maximum edge in pixels. |
Returns:
High-resolution bitmap.
- Type
- Promise.<(CanvasImageSource|null)>
(abstract) getPageMetadata(_index) → {PageMetadata|null}
- Description:
Returns metadata for a page.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
_index |
number | Page index. |
Returns:
Page metadata.
- Type
- PageMetadata | null
(async, abstract) getPagePreview(_index) → {Promise.<(CanvasImageSource|null)>}
- Description:
Returns a preview bitmap for a page.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
_index |
number | Page index. |
Returns:
Preview bitmap.
- Type
- Promise.<(CanvasImageSource|null)>
notifyPageChanged(index) → {void}
- Description:
Emits
pagechangedfor a page index.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | Page index. |
Returns:
- Type
- void
notifyPageCountChanged() → {void}
- Description:
Emits
pagecountchanged.
- Source:
Returns:
- Type
- void
off(event, fn) → {void}
- Description:
Removes a source event listener.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
string | Event name. |
fn |
function | Listener callback. |
Returns:
- Type
- void
on(event, fn) → {function}
- Description:
Subscribes to a source event.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
event |
string | Event name. |
fn |
function | Listener callback. |
Returns:
Unsubscribe function.
- Type
- function