This class provides an ability for user to customize the several UI like contextmenu which may be triggered from PDFViewCtrl
module, that stuffs should be customized like the example:
...otherOptions,
viewerUI:
class extends PDFViewCtrl.
IViewerUI {
...implementations
}
})
.
More...
|
| alert (message) |
| Display an alert dialog with the optional content and an OK button, then returns an fullfilled Promise after alert dialog closed. More...
|
|
| confirm (message) |
| Displays a modal dialog with an optional message and two buttons: OK and Cancel, then returns an Promise, that will be fullfilled if user clicks OK, and be rejected if user clicks Cancel. More...
|
|
| createContextMenu (key, anchor, config) |
| A method used to create the contextmenu component and registers the right-click event. You can override this method to customize the right-click menus. More...
|
|
| createTextSelectionTooltip (pageRender) |
| Creates a tooltip component that displays when user select texts. More...
|
|
| destroy () |
| A method will be called when PDFViewer is destroyed. You should override this method to perform the operation of destroy resources.
|
|
| getSignatureUI () |
| Obtains the instance which implements ISignatureUI. This method retrieves the user interface component responsible for managing digital signatures. More...
|
|
| loading (coverOn) |
| Displays a loading layer to indicate the loading state of a page or a component. More...
|
|
| prompt (defaultValue, message, title) |
| Displays a dialog with an optional message prompting the user to input some text. More...
|
|
| promptPassword (defaultValue, message, title) |
| Displays a dialog with a optional message prompting the user to input password. More...
|
|
This class provides an ability for user to customize the several UI like contextmenu which may be triggered from PDFViewCtrl
module, that stuffs should be customized like the example:
...otherOptions,
viewerUI:
class extends PDFViewCtrl.
IViewerUI {
...implementations
}
})
.
◆ alert()
IViewerUI::alert |
( |
|
message | ) |
|
|
inline |
Display an alert dialog with the optional content and an OK button, then returns an fullfilled Promise after alert dialog closed.
- Parameters
-
message | string - The alert dialog message, i18nect.js entry format. |
- Returns
- Promise<void>
◆ confirm()
IViewerUI::confirm |
( |
|
message | ) |
|
|
inline |
Displays a modal dialog with an optional message and two buttons: OK and Cancel, then returns an Promise, that will be fullfilled if user clicks OK, and be rejected if user clicks Cancel.
- Parameters
-
message | string - The confirm dialog message, i18next.js entry format. |
- Returns
- Promise<void>
◆ createContextMenu()
IViewerUI::createContextMenu |
( |
|
key, |
|
|
|
anchor, |
|
|
|
config |
|
) |
| |
|
inline |
A method used to create the contextmenu component and registers the right-click event. You can override this method to customize the right-click menus.
- Parameters
-
key | any - Indicates the owner of the contextmneu instance returned by this method , which can be the name of a state-handler or an instance of AnnotComponent . |
anchor | HTMLElement - An html element used to respond to right-click events. |
config | object |
config.selector | string - A css selector of an element where to trigger this menu, this element should be the anchor or it's children. |
config.items | Array<{nameI18nKey:string}> - The default menu items, Refer to JQuery contextmenu plugin |
config.items[].nameI18nKey | string - Menu text in i18next.js entry format. |
- Returns
- IContextMenu|undefined - An context menu component including show/hide and destroy API and returning undefined means that the right-click menu of the specified target will not be displayed
◆ createTextSelectionTooltip()
IViewerUI::createTextSelectionTooltip |
( |
|
pageRender | ) |
|
|
inline |
Creates a tooltip component that displays when user select texts.
- Parameters
-
- Returns
- IFloatingTooltip
◆ getSignatureUI()
IViewerUI::getSignatureUI |
( |
| ) |
|
|
inline |
Obtains the instance which implements ISignatureUI. This method retrieves the user interface component responsible for managing digital signatures.
- Returns
- Promise<ISignatureUI> - A promise that resolves to the instance of ISignatureUI. 10.1.0
◆ loading()
IViewerUI::loading |
( |
|
coverOn | ) |
|
|
inline |
Displays a loading layer to indicate the loading state of a page or a component.
- Parameters
-
coverOn | HTMLElement - the target layer |
- Returns
- Function - A function used to close the loading layer.
◆ prompt()
IViewerUI::prompt |
( |
|
defaultValue, |
|
|
|
message, |
|
|
|
title |
|
) |
| |
|
inline |
Displays a dialog with an optional message prompting the user to input some text.
- Parameters
-
defaultValue | string - A string contains the default value displayed in the text input. |
message | string - A string of text to display to user. |
title | string - A string of the dialog title. |
- Returns
- Promise<string> - Returns a promise that fullfilled with the value in the input.
◆ promptPassword()
Promise< string > IViewerUI::promptPassword |
( |
|
defaultValue, |
|
|
|
message, |
|
|
|
title |
|
) |
| |
|
inline |
Displays a dialog with a optional message prompting the user to input password.
- Parameters
-
defaultValue | string - A string value of password displayed in the password input |
message | string - A string of text to display to user. |
title | string - A string of the dialog title |
- Returns
- Promise<string> - Returns a promise that fullfilled with the value in the password input.