|
FoxitPDFSDKforWeb v12.0.0
Foxit PDF SDK for Web
|
Service for reading and writing comparison-result filter options. More...
Public Member Functions | |
| CompareFilterOptions | getDefaultFilterOptions () |
| Returns a copy of the default filter options applied when a comparison result document is opened. More... | |
| CompareFilterOptions | getFilterOptions () |
Returns a copy of the current filter options (the Filter dropdown state). Opening a comparison result resets this to getDefaultFilterOptions(). More... | |
| Function | onFilterOptionsUpdated (callback) |
| Subscribe to filter-option changes from the API or the Filter dropdown. If options already have a value, the callback is invoked immediately with the current options when subscribing. More... | |
| void | setDefaultFilterOptions (options) |
Store default filter options used when a comparison result document is opened. This does not update the currently displayed Filter dropdown; call updateFilterOptions for that. More... | |
| void | updateFilterOptions (options) |
Update the currently displayed filter options (checkboxes and layer visibility). This does not change getDefaultFilterOptions(). The next opened comparison result still applies the stored defaults. More... | |
Service for reading and writing comparison-result filter options.
Use this to change which change categories (text, images/graphics, annotations, formatting) are checked in the Filter dropdown. setDefaultFilterOptions only stores defaults for the next comparison result document; it does not change the currently displayed Filter dropdown. Use updateFilterOptions to change the current checkboxes and layers.
| CompareFilterOptions CompareFilterOptionsService::getDefaultFilterOptions | ( | ) |
Returns a copy of the default filter options applied when a comparison result document is opened.
| CompareFilterOptions CompareFilterOptionsService::getFilterOptions | ( | ) |
Returns a copy of the current filter options (the Filter dropdown state). Opening a comparison result resets this to getDefaultFilterOptions().
| Function CompareFilterOptionsService::onFilterOptionsUpdated | ( | callback | ) |
Subscribe to filter-option changes from the API or the Filter dropdown. If options already have a value, the callback is invoked immediately with the current options when subscribing.
| callback | (newOptions: CompareFilterOptions) => void |
| void CompareFilterOptionsService::setDefaultFilterOptions | ( | options | ) |
Store default filter options used when a comparison result document is opened. This does not update the currently displayed Filter dropdown; call updateFilterOptions for that.
| options | Partial<CompareFilterOptions> - If Everything is a boolean, the four category flags (Text, Images, Annotation, Formatting) are all set to that boolean and other keys in options are ignored. Otherwise the stored defaults are replaced and omitted keys become false. When a comparison result is opened, Everything on the Filter dropdown is derived from whether all four categories are true. |
| void CompareFilterOptionsService::updateFilterOptions | ( | options | ) |
Update the currently displayed filter options (checkboxes and layer visibility). This does not change getDefaultFilterOptions(). The next opened comparison result still applies the stored defaults.
| options | Partial<CompareFilterOptions> - Flags to merge into the current Filter dropdown. Omitted keys keep their current values. If Everything changes, all four categories are set to that boolean (same as the Filter dropdown). If Everything is omitted, it is derived from whether all four categories are true. If no comparison result document is open, this still updates helper current state, but the next opened result will reset to getDefaultFilterOptions(). |