mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Convert the find controller to ES6 syntax
Moreover, rename `FindStates` to `FindState` since enumeration names are usually not in plural, for readability and consistency with the ones in `src/shared/util.js`.
This commit is contained in:
parent
8654635b0b
commit
9a95d91b92
2 changed files with 400 additions and 404 deletions
|
@ -13,7 +13,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FindStates } from './pdf_find_controller';
|
||||
import { FindState } from './pdf_find_controller';
|
||||
import { NullL10n } from './ui_utils';
|
||||
|
||||
/**
|
||||
|
@ -108,19 +108,19 @@ class PDFFindBar {
|
|||
var status = '';
|
||||
|
||||
switch (state) {
|
||||
case FindStates.FIND_FOUND:
|
||||
case FindState.FOUND:
|
||||
break;
|
||||
|
||||
case FindStates.FIND_PENDING:
|
||||
case FindState.PENDING:
|
||||
status = 'pending';
|
||||
break;
|
||||
|
||||
case FindStates.FIND_NOTFOUND:
|
||||
case FindState.NOT_FOUND:
|
||||
findMsg = this.l10n.get('find_not_found', null, 'Phrase not found');
|
||||
notFound = true;
|
||||
break;
|
||||
|
||||
case FindStates.FIND_WRAPPED:
|
||||
case FindState.WRAPPED:
|
||||
if (previous) {
|
||||
findMsg = this.l10n.get('find_reached_top', null,
|
||||
'Reached top of document, continued from bottom');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue