|
| get (name) |
| Get state handler by name. More...
|
|
| getCurrentStates () |
| Get current state handler. More...
|
|
| getStateHandlerConfig (stateHandlerName) |
| Get state handler config by name. More...
|
|
| mergeStateHandlerConfig (stateHandlerName, stateHandlerConfig) |
| Unlike the setStateHandlerConfig method, this method doesn't overwrite the last config each time it is called, but overwrites a portion of properties you passed in. More...
|
|
| register (StateHandler) |
| Register state handler. More...
|
|
| setStateHandlerConfig (stateHandlerName, stateHandlerConfig) |
| Set the state-handler config by name, this method will overwrite the existing config, the config may take effect the next time you switch to the state-handler. More...
|
|
| switchTo (name, params) |
| Switch to state handler. More...
|
|
◆ get()
StateHandlerManager::get |
( |
|
name | ) |
|
|
inline |
Get state handler by name.
- Parameters
-
- Returns
- new<T extends IStateHandler>(pdfViewer:PDFViewer)=>T - Returns HandStateHandler by default
◆ getCurrentStates()
StateHandlerManager::getCurrentStates |
( |
| ) |
|
|
inline |
Get current state handler.
- Returns
- new<T extends IStateHandler>(pdfViewer:PDFViewer)=>T -
◆ getStateHandlerConfig()
StateHandlerManager::getStateHandlerConfig |
( |
|
stateHandlerName | ) |
|
|
inline |
Get state handler config by name.
- Parameters
-
- Returns
- StateHandlerConfig|undefined - Returns undefined if no config is set.
- Since
- 9.0.0
◆ mergeStateHandlerConfig()
StateHandlerManager::mergeStateHandlerConfig |
( |
|
stateHandlerName, |
|
|
|
stateHandlerConfig |
|
) |
| |
|
inline |
Unlike the setStateHandlerConfig method, this method doesn't overwrite the last config each time it is called, but overwrites a portion of properties you passed in.
- Parameters
-
- Since
- 9.0.0
- Returns
- void -
◆ register()
StateHandlerManager::register |
( |
|
StateHandler | ) |
|
|
inline |
Register state handler.
- Parameters
-
StateHandler | new<T extends IStateHandler>(pdfViewer:PDFViewer)=>T - |
◆ setStateHandlerConfig()
StateHandlerManager::setStateHandlerConfig |
( |
|
stateHandlerName, |
|
|
|
stateHandlerConfig |
|
) |
| |
|
inline |
Set the state-handler config by name, this method will overwrite the existing config, the config may take effect the next time you switch to the state-handler.
- Note
- The effective timing of each config item is different, please refer to the documentation of each properties of StateHandlerConfig .
- Parameters
-
- Since
- 9.0.0
- Returns
- void -
◆ switchTo()
StateHandlerManager::switchTo |
( |
|
name, |
|
|
|
params |
|
) |
| |
|
inline |
Switch to state handler.
- Note
- If encounter error, it will switch to HandStateHandler.
- Parameters
-
- See also
- STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_STAMP
async function example (pdfViewer) {
var handlerManager = await pdfViewer.getStateHandlerManager();
await handlerManager.switchTo(PDFViewCtrl.STATE_HANDLER_NAMES.STATE_HANDLER_CREATE_STAMP, {
category: 'Static',
name: 'Void'
});
}
-
STATE_HANDLER_NAMES