2013-09-05 06:48:31 +09:00
|
|
|
/* Copyright 2012 Mozilla Foundation
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2023-02-04 21:55:12 +09:00
|
|
|
import { CursorTool, ScrollMode, SpreadMode } from "./ui_utils.js";
|
2022-09-08 18:53:56 +09:00
|
|
|
import { PagesCountLimit } from "./pdf_viewer.js";
|
2016-04-09 02:34:27 +09:00
|
|
|
|
2016-05-11 08:31:03 +09:00
|
|
|
/**
|
|
|
|
* @typedef {Object} SecondaryToolbarOptions
|
|
|
|
* @property {HTMLDivElement} toolbar - Container for the secondary toolbar.
|
|
|
|
* @property {HTMLButtonElement} toggleButton - Button to toggle the visibility
|
|
|
|
* of the secondary toolbar.
|
|
|
|
* @property {HTMLButtonElement} presentationModeButton - Button for entering
|
|
|
|
* presentation mode.
|
|
|
|
* @property {HTMLButtonElement} openFileButton - Button to open a file.
|
|
|
|
* @property {HTMLButtonElement} printButton - Button to print the document.
|
|
|
|
* @property {HTMLButtonElement} downloadButton - Button to download the
|
|
|
|
* document.
|
2021-09-30 20:30:55 +09:00
|
|
|
* @property {HTMLAnchorElement} viewBookmarkButton - Button to obtain a
|
|
|
|
* bookmark link to the current location in the document.
|
2016-05-11 08:31:03 +09:00
|
|
|
* @property {HTMLButtonElement} firstPageButton - Button to go to the first
|
|
|
|
* page in the document.
|
|
|
|
* @property {HTMLButtonElement} lastPageButton - Button to go to the last page
|
|
|
|
* in the document.
|
|
|
|
* @property {HTMLButtonElement} pageRotateCwButton - Button to rotate the pages
|
|
|
|
* clockwise.
|
|
|
|
* @property {HTMLButtonElement} pageRotateCcwButton - Button to rotate the
|
|
|
|
* pages counterclockwise.
|
2016-09-07 20:30:26 +09:00
|
|
|
* @property {HTMLButtonElement} cursorSelectToolButton - Button to enable the
|
|
|
|
* select tool.
|
|
|
|
* @property {HTMLButtonElement} cursorHandToolButton - Button to enable the
|
2016-05-11 08:31:03 +09:00
|
|
|
* hand tool.
|
|
|
|
* @property {HTMLButtonElement} documentPropertiesButton - Button for opening
|
|
|
|
* the document properties dialog.
|
|
|
|
*/
|
2013-09-05 06:48:31 +09:00
|
|
|
|
2017-05-08 04:43:50 +09:00
|
|
|
class SecondaryToolbar {
|
2016-05-11 08:31:03 +09:00
|
|
|
/**
|
|
|
|
* @param {SecondaryToolbarOptions} options
|
|
|
|
* @param {EventBus} eventBus
|
|
|
|
*/
|
2022-09-09 02:23:41 +09:00
|
|
|
constructor(options, eventBus, externalServices) {
|
2013-09-05 06:48:31 +09:00
|
|
|
this.toolbar = options.toolbar;
|
2013-10-18 06:49:30 +09:00
|
|
|
this.toggleButton = options.toggleButton;
|
2016-05-11 08:31:03 +09:00
|
|
|
this.buttons = [
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
{
|
|
|
|
element: options.presentationModeButton,
|
|
|
|
eventName: "presentationmode",
|
|
|
|
close: true,
|
|
|
|
},
|
|
|
|
{ element: options.printButton, eventName: "print", close: true },
|
|
|
|
{ element: options.downloadButton, eventName: "download", close: true },
|
|
|
|
{ element: options.viewBookmarkButton, eventName: null, close: true },
|
|
|
|
{ element: options.firstPageButton, eventName: "firstpage", close: true },
|
|
|
|
{ element: options.lastPageButton, eventName: "lastpage", close: true },
|
|
|
|
{
|
|
|
|
element: options.pageRotateCwButton,
|
|
|
|
eventName: "rotatecw",
|
|
|
|
close: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.pageRotateCcwButton,
|
|
|
|
eventName: "rotateccw",
|
|
|
|
close: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.cursorSelectToolButton,
|
|
|
|
eventName: "switchcursortool",
|
|
|
|
eventDetails: { tool: CursorTool.SELECT },
|
|
|
|
close: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.cursorHandToolButton,
|
|
|
|
eventName: "switchcursortool",
|
|
|
|
eventDetails: { tool: CursorTool.HAND },
|
|
|
|
close: true,
|
|
|
|
},
|
2021-10-07 21:04:41 +09:00
|
|
|
{
|
|
|
|
element: options.scrollPageButton,
|
|
|
|
eventName: "switchscrollmode",
|
|
|
|
eventDetails: { mode: ScrollMode.PAGE },
|
|
|
|
close: true,
|
|
|
|
},
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
{
|
|
|
|
element: options.scrollVerticalButton,
|
|
|
|
eventName: "switchscrollmode",
|
|
|
|
eventDetails: { mode: ScrollMode.VERTICAL },
|
|
|
|
close: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.scrollHorizontalButton,
|
|
|
|
eventName: "switchscrollmode",
|
|
|
|
eventDetails: { mode: ScrollMode.HORIZONTAL },
|
|
|
|
close: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.scrollWrappedButton,
|
|
|
|
eventName: "switchscrollmode",
|
|
|
|
eventDetails: { mode: ScrollMode.WRAPPED },
|
|
|
|
close: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.spreadNoneButton,
|
|
|
|
eventName: "switchspreadmode",
|
|
|
|
eventDetails: { mode: SpreadMode.NONE },
|
|
|
|
close: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.spreadOddButton,
|
|
|
|
eventName: "switchspreadmode",
|
|
|
|
eventDetails: { mode: SpreadMode.ODD },
|
|
|
|
close: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.spreadEvenButton,
|
|
|
|
eventName: "switchspreadmode",
|
|
|
|
eventDetails: { mode: SpreadMode.EVEN },
|
|
|
|
close: true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
element: options.documentPropertiesButton,
|
|
|
|
eventName: "documentproperties",
|
|
|
|
close: true,
|
|
|
|
},
|
2013-10-18 06:49:30 +09:00
|
|
|
];
|
2022-05-08 05:05:39 +09:00
|
|
|
if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) {
|
2022-04-25 17:06:47 +09:00
|
|
|
this.buttons.push({
|
|
|
|
element: options.openFileButton,
|
|
|
|
eventName: "openfile",
|
|
|
|
close: true,
|
|
|
|
});
|
|
|
|
}
|
2016-11-19 03:50:29 +09:00
|
|
|
this.items = {
|
|
|
|
firstPage: options.firstPageButton,
|
|
|
|
lastPage: options.lastPageButton,
|
|
|
|
pageRotateCw: options.pageRotateCwButton,
|
|
|
|
pageRotateCcw: options.pageRotateCcwButton,
|
|
|
|
};
|
2013-10-18 06:49:30 +09:00
|
|
|
|
2016-05-11 08:31:03 +09:00
|
|
|
this.eventBus = eventBus;
|
2022-09-09 02:23:41 +09:00
|
|
|
this.externalServices = externalServices;
|
2016-05-11 08:31:03 +09:00
|
|
|
this.opened = false;
|
|
|
|
|
2018-05-15 12:10:32 +09:00
|
|
|
// Bind the event listeners for click, cursor tool, and scroll/spread mode
|
|
|
|
// actions.
|
2022-03-06 23:44:53 +09:00
|
|
|
this.#bindClickListeners();
|
|
|
|
this.#bindCursorToolsListener(options);
|
|
|
|
this.#bindScrollModeListener(options);
|
|
|
|
this.#bindSpreadModeListener(options);
|
2022-08-10 04:33:18 +09:00
|
|
|
|
|
|
|
this.reset();
|
2016-05-11 08:31:03 +09:00
|
|
|
}
|
|
|
|
|
2017-05-08 04:43:50 +09:00
|
|
|
/**
|
2019-10-13 00:02:54 +09:00
|
|
|
* @type {boolean}
|
2017-05-08 04:43:50 +09:00
|
|
|
*/
|
|
|
|
get isOpen() {
|
|
|
|
return this.opened;
|
|
|
|
}
|
|
|
|
|
|
|
|
setPageNumber(pageNumber) {
|
|
|
|
this.pageNumber = pageNumber;
|
2022-03-06 23:44:53 +09:00
|
|
|
this.#updateUIState();
|
2017-05-08 04:43:50 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
setPagesCount(pagesCount) {
|
|
|
|
this.pagesCount = pagesCount;
|
2022-03-06 23:44:53 +09:00
|
|
|
this.#updateUIState();
|
2017-05-08 04:43:50 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
reset() {
|
|
|
|
this.pageNumber = 0;
|
|
|
|
this.pagesCount = 0;
|
2022-03-06 23:44:53 +09:00
|
|
|
this.#updateUIState();
|
2018-06-30 21:54:33 +09:00
|
|
|
|
|
|
|
// Reset the Scroll/Spread buttons too, since they're document specific.
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
this.eventBus.dispatch("secondarytoolbarreset", { source: this });
|
2017-05-08 04:43:50 +09:00
|
|
|
}
|
|
|
|
|
2022-03-06 23:44:53 +09:00
|
|
|
#updateUIState() {
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
this.items.firstPage.disabled = this.pageNumber <= 1;
|
|
|
|
this.items.lastPage.disabled = this.pageNumber >= this.pagesCount;
|
2017-05-08 04:43:50 +09:00
|
|
|
this.items.pageRotateCw.disabled = this.pagesCount === 0;
|
|
|
|
this.items.pageRotateCcw.disabled = this.pagesCount === 0;
|
|
|
|
}
|
|
|
|
|
2022-03-06 23:44:53 +09:00
|
|
|
#bindClickListeners() {
|
2017-05-08 04:43:50 +09:00
|
|
|
// Button to toggle the visibility of the secondary toolbar.
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
this.toggleButton.addEventListener("click", this.toggle.bind(this));
|
2017-05-08 04:43:50 +09:00
|
|
|
|
|
|
|
// All items within the secondary toolbar.
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
for (const { element, eventName, close, eventDetails } of this.buttons) {
|
|
|
|
element.addEventListener("click", evt => {
|
2017-05-08 04:43:50 +09:00
|
|
|
if (eventName !== null) {
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
const details = { source: this };
|
2019-12-23 02:20:30 +09:00
|
|
|
for (const property in eventDetails) {
|
2016-09-07 20:30:26 +09:00
|
|
|
details[property] = eventDetails[property];
|
|
|
|
}
|
|
|
|
this.eventBus.dispatch(eventName, details);
|
2016-05-11 08:31:03 +09:00
|
|
|
}
|
2017-05-08 04:43:50 +09:00
|
|
|
if (close) {
|
|
|
|
this.close();
|
2016-05-11 08:31:03 +09:00
|
|
|
}
|
2022-09-09 02:23:41 +09:00
|
|
|
this.externalServices.reportTelemetry({
|
|
|
|
type: "buttons",
|
|
|
|
data: { id: element.id },
|
|
|
|
});
|
2016-12-10 21:58:06 +09:00
|
|
|
});
|
2017-05-08 04:43:50 +09:00
|
|
|
}
|
|
|
|
}
|
2016-09-08 19:35:49 +09:00
|
|
|
|
2022-02-11 22:04:47 +09:00
|
|
|
#bindCursorToolsListener({ cursorSelectToolButton, cursorHandToolButton }) {
|
2020-04-14 19:28:14 +09:00
|
|
|
this.eventBus._on("cursortoolchanged", function ({ tool }) {
|
2022-02-11 22:04:47 +09:00
|
|
|
const isSelect = tool === CursorTool.SELECT,
|
|
|
|
isHand = tool === CursorTool.HAND;
|
|
|
|
|
|
|
|
cursorSelectToolButton.classList.toggle("toggled", isSelect);
|
|
|
|
cursorHandToolButton.classList.toggle("toggled", isHand);
|
|
|
|
|
2022-04-01 00:26:28 +09:00
|
|
|
cursorSelectToolButton.setAttribute("aria-checked", isSelect);
|
|
|
|
cursorHandToolButton.setAttribute("aria-checked", isHand);
|
2017-05-08 04:43:50 +09:00
|
|
|
});
|
|
|
|
}
|
2016-09-08 19:35:49 +09:00
|
|
|
|
2022-02-11 22:04:47 +09:00
|
|
|
#bindScrollModeListener({
|
|
|
|
scrollPageButton,
|
|
|
|
scrollVerticalButton,
|
|
|
|
scrollHorizontalButton,
|
|
|
|
scrollWrappedButton,
|
|
|
|
spreadNoneButton,
|
|
|
|
spreadOddButton,
|
|
|
|
spreadEvenButton,
|
|
|
|
}) {
|
Enforce PAGE-scrolling for *very* large/long documents (bug 1588435, PR 11263 follow-up)
This patch is essentially a continuation of PR 11263, which tried to improve loading/initialization performance of *very* large/long documents.
Note that browsers, in general, don't handle a huge amount of DOM-elements very well, with really poor (e.g. sluggish scrolling) performance once the number gets "large". Furthermore, at least in Firefox, it seems that DOM-elements towards the bottom of a HTML-page can effectively be ignored; for the PDF.js viewer that means that pages at the end of the document can become impossible to access.
Hence, in order to improve things for these *very* large/long documents, this patch will now enforce usage of the (recently added) PAGE-scrolling mode for these documents. As implemented, this will only happen once the number of pages *exceed* 15000 (which is hopefully rare in practice).
While this might feel a bit jarring to users being *forced* to use PAGE-scrolling, it seems all things considered like a better idea to ensure that the entire document actually remains accessible and with (hopefully) more acceptable performance.
Fixes [bug 1588435](https://bugzilla.mozilla.org/show_bug.cgi?id=1588435), to the extent that doing so is possible since the document contains 25560 pages (and is 197 MB large).
2021-11-29 02:43:30 +09:00
|
|
|
const scrollModeChanged = ({ mode }) => {
|
2022-02-11 22:04:47 +09:00
|
|
|
const isPage = mode === ScrollMode.PAGE,
|
|
|
|
isVertical = mode === ScrollMode.VERTICAL,
|
|
|
|
isHorizontal = mode === ScrollMode.HORIZONTAL,
|
|
|
|
isWrapped = mode === ScrollMode.WRAPPED;
|
|
|
|
|
|
|
|
scrollPageButton.classList.toggle("toggled", isPage);
|
|
|
|
scrollVerticalButton.classList.toggle("toggled", isVertical);
|
|
|
|
scrollHorizontalButton.classList.toggle("toggled", isHorizontal);
|
|
|
|
scrollWrappedButton.classList.toggle("toggled", isWrapped);
|
|
|
|
|
2022-04-01 00:26:28 +09:00
|
|
|
scrollPageButton.setAttribute("aria-checked", isPage);
|
|
|
|
scrollVerticalButton.setAttribute("aria-checked", isVertical);
|
|
|
|
scrollHorizontalButton.setAttribute("aria-checked", isHorizontal);
|
|
|
|
scrollWrappedButton.setAttribute("aria-checked", isWrapped);
|
2018-07-08 17:56:06 +09:00
|
|
|
|
Enforce PAGE-scrolling for *very* large/long documents (bug 1588435, PR 11263 follow-up)
This patch is essentially a continuation of PR 11263, which tried to improve loading/initialization performance of *very* large/long documents.
Note that browsers, in general, don't handle a huge amount of DOM-elements very well, with really poor (e.g. sluggish scrolling) performance once the number gets "large". Furthermore, at least in Firefox, it seems that DOM-elements towards the bottom of a HTML-page can effectively be ignored; for the PDF.js viewer that means that pages at the end of the document can become impossible to access.
Hence, in order to improve things for these *very* large/long documents, this patch will now enforce usage of the (recently added) PAGE-scrolling mode for these documents. As implemented, this will only happen once the number of pages *exceed* 15000 (which is hopefully rare in practice).
While this might feel a bit jarring to users being *forced* to use PAGE-scrolling, it seems all things considered like a better idea to ensure that the entire document actually remains accessible and with (hopefully) more acceptable performance.
Fixes [bug 1588435](https://bugzilla.mozilla.org/show_bug.cgi?id=1588435), to the extent that doing so is possible since the document contains 25560 pages (and is 197 MB large).
2021-11-29 02:43:30 +09:00
|
|
|
// Permanently *disable* the Scroll buttons when PAGE-scrolling is being
|
|
|
|
// enforced for *very* long/large documents; please see the `BaseViewer`.
|
|
|
|
const forceScrollModePage =
|
|
|
|
this.pagesCount > PagesCountLimit.FORCE_SCROLL_MODE_PAGE;
|
2022-02-11 22:04:47 +09:00
|
|
|
scrollPageButton.disabled = forceScrollModePage;
|
|
|
|
scrollVerticalButton.disabled = forceScrollModePage;
|
|
|
|
scrollHorizontalButton.disabled = forceScrollModePage;
|
|
|
|
scrollWrappedButton.disabled = forceScrollModePage;
|
Enforce PAGE-scrolling for *very* large/long documents (bug 1588435, PR 11263 follow-up)
This patch is essentially a continuation of PR 11263, which tried to improve loading/initialization performance of *very* large/long documents.
Note that browsers, in general, don't handle a huge amount of DOM-elements very well, with really poor (e.g. sluggish scrolling) performance once the number gets "large". Furthermore, at least in Firefox, it seems that DOM-elements towards the bottom of a HTML-page can effectively be ignored; for the PDF.js viewer that means that pages at the end of the document can become impossible to access.
Hence, in order to improve things for these *very* large/long documents, this patch will now enforce usage of the (recently added) PAGE-scrolling mode for these documents. As implemented, this will only happen once the number of pages *exceed* 15000 (which is hopefully rare in practice).
While this might feel a bit jarring to users being *forced* to use PAGE-scrolling, it seems all things considered like a better idea to ensure that the entire document actually remains accessible and with (hopefully) more acceptable performance.
Fixes [bug 1588435](https://bugzilla.mozilla.org/show_bug.cgi?id=1588435), to the extent that doing so is possible since the document contains 25560 pages (and is 197 MB large).
2021-11-29 02:43:30 +09:00
|
|
|
|
2018-07-08 17:56:06 +09:00
|
|
|
// Temporarily *disable* the Spread buttons when horizontal scrolling is
|
|
|
|
// enabled, since the non-default Spread modes doesn't affect the layout.
|
2022-02-11 22:04:47 +09:00
|
|
|
spreadNoneButton.disabled = isHorizontal;
|
|
|
|
spreadOddButton.disabled = isHorizontal;
|
|
|
|
spreadEvenButton.disabled = isHorizontal;
|
Enforce PAGE-scrolling for *very* large/long documents (bug 1588435, PR 11263 follow-up)
This patch is essentially a continuation of PR 11263, which tried to improve loading/initialization performance of *very* large/long documents.
Note that browsers, in general, don't handle a huge amount of DOM-elements very well, with really poor (e.g. sluggish scrolling) performance once the number gets "large". Furthermore, at least in Firefox, it seems that DOM-elements towards the bottom of a HTML-page can effectively be ignored; for the PDF.js viewer that means that pages at the end of the document can become impossible to access.
Hence, in order to improve things for these *very* large/long documents, this patch will now enforce usage of the (recently added) PAGE-scrolling mode for these documents. As implemented, this will only happen once the number of pages *exceed* 15000 (which is hopefully rare in practice).
While this might feel a bit jarring to users being *forced* to use PAGE-scrolling, it seems all things considered like a better idea to ensure that the entire document actually remains accessible and with (hopefully) more acceptable performance.
Fixes [bug 1588435](https://bugzilla.mozilla.org/show_bug.cgi?id=1588435), to the extent that doing so is possible since the document contains 25560 pages (and is 197 MB large).
2021-11-29 02:43:30 +09:00
|
|
|
};
|
Re-factor the `EventBus` to allow servicing of "external" event listeners *after* the viewer components have updated
Since the goal has always been, essentially since the `EventBus` abstraction was added, to remove all dispatching of DOM events[1] from the viewer components this patch tries to address one thing that came up when updating the examples:
The DOM events are always dispatched last, and it's thus guaranteed that all internal event listeners have been invoked first.
However, there's no such guarantees with the general `EventBus` functionality and the order in which event listeners are invoked is *not* specified. With the promotion of the `EventBus` in the examples, over DOM events, it seems like a good idea to at least *try* to keep this ordering invariant[2] intact.
Obviously this won't prevent anyone from manually calling the new *internal* viewer component methods on the `EventBus`, but hopefully that won't be too common since any existing third-party code would obviously use the `on`/`off` methods and that all of the examples shows the *correct* usage (which should be similarily documented on the "Third party viewer usage" Wiki-page).
---
[1] Looking at the various Firefox-tests, I'm not sure that it'll be possible to (easily) re-write all of them to not rely on DOM events (since getting access to `PDFViewerApplication` might be generally difficult/messy depending on scopes).
In any case, even if technically feasible, it would most likely add *a lot* of complication that may not be desireable in the various Firefox-tests. All-in-all, I'd be fine with keeping the DOM events only for the `MOZCENTRAL` target and gated on `Cu.isInAutomation` (or similar) rather than a preference.
[2] I wouldn't expect any *real* bugs in a custom implementation, simply based on event ordering, but it nonetheless seem like a good idea if any "external" events are still handled last.
2020-02-27 07:33:27 +09:00
|
|
|
this.eventBus._on("scrollmodechanged", scrollModeChanged);
|
2018-06-30 21:54:33 +09:00
|
|
|
|
Re-factor the `EventBus` to allow servicing of "external" event listeners *after* the viewer components have updated
Since the goal has always been, essentially since the `EventBus` abstraction was added, to remove all dispatching of DOM events[1] from the viewer components this patch tries to address one thing that came up when updating the examples:
The DOM events are always dispatched last, and it's thus guaranteed that all internal event listeners have been invoked first.
However, there's no such guarantees with the general `EventBus` functionality and the order in which event listeners are invoked is *not* specified. With the promotion of the `EventBus` in the examples, over DOM events, it seems like a good idea to at least *try* to keep this ordering invariant[2] intact.
Obviously this won't prevent anyone from manually calling the new *internal* viewer component methods on the `EventBus`, but hopefully that won't be too common since any existing third-party code would obviously use the `on`/`off` methods and that all of the examples shows the *correct* usage (which should be similarily documented on the "Third party viewer usage" Wiki-page).
---
[1] Looking at the various Firefox-tests, I'm not sure that it'll be possible to (easily) re-write all of them to not rely on DOM events (since getting access to `PDFViewerApplication` might be generally difficult/messy depending on scopes).
In any case, even if technically feasible, it would most likely add *a lot* of complication that may not be desireable in the various Firefox-tests. All-in-all, I'd be fine with keeping the DOM events only for the `MOZCENTRAL` target and gated on `Cu.isInAutomation` (or similar) rather than a preference.
[2] I wouldn't expect any *real* bugs in a custom implementation, simply based on event ordering, but it nonetheless seem like a good idea if any "external" events are still handled last.
2020-02-27 07:33:27 +09:00
|
|
|
this.eventBus._on("secondarytoolbarreset", evt => {
|
2018-06-30 21:54:33 +09:00
|
|
|
if (evt.source === this) {
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
scrollModeChanged({ mode: ScrollMode.VERTICAL });
|
2018-06-30 21:54:33 +09:00
|
|
|
}
|
2018-05-15 12:10:32 +09:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2022-02-11 22:04:47 +09:00
|
|
|
#bindSpreadModeListener({
|
|
|
|
spreadNoneButton,
|
|
|
|
spreadOddButton,
|
|
|
|
spreadEvenButton,
|
|
|
|
}) {
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
function spreadModeChanged({ mode }) {
|
2022-02-11 22:04:47 +09:00
|
|
|
const isNone = mode === SpreadMode.NONE,
|
|
|
|
isOdd = mode === SpreadMode.ODD,
|
|
|
|
isEven = mode === SpreadMode.EVEN;
|
|
|
|
|
|
|
|
spreadNoneButton.classList.toggle("toggled", isNone);
|
|
|
|
spreadOddButton.classList.toggle("toggled", isOdd);
|
|
|
|
spreadEvenButton.classList.toggle("toggled", isEven);
|
|
|
|
|
2022-04-01 00:26:28 +09:00
|
|
|
spreadNoneButton.setAttribute("aria-checked", isNone);
|
|
|
|
spreadOddButton.setAttribute("aria-checked", isOdd);
|
|
|
|
spreadEvenButton.setAttribute("aria-checked", isEven);
|
2018-06-30 21:54:33 +09:00
|
|
|
}
|
Re-factor the `EventBus` to allow servicing of "external" event listeners *after* the viewer components have updated
Since the goal has always been, essentially since the `EventBus` abstraction was added, to remove all dispatching of DOM events[1] from the viewer components this patch tries to address one thing that came up when updating the examples:
The DOM events are always dispatched last, and it's thus guaranteed that all internal event listeners have been invoked first.
However, there's no such guarantees with the general `EventBus` functionality and the order in which event listeners are invoked is *not* specified. With the promotion of the `EventBus` in the examples, over DOM events, it seems like a good idea to at least *try* to keep this ordering invariant[2] intact.
Obviously this won't prevent anyone from manually calling the new *internal* viewer component methods on the `EventBus`, but hopefully that won't be too common since any existing third-party code would obviously use the `on`/`off` methods and that all of the examples shows the *correct* usage (which should be similarily documented on the "Third party viewer usage" Wiki-page).
---
[1] Looking at the various Firefox-tests, I'm not sure that it'll be possible to (easily) re-write all of them to not rely on DOM events (since getting access to `PDFViewerApplication` might be generally difficult/messy depending on scopes).
In any case, even if technically feasible, it would most likely add *a lot* of complication that may not be desireable in the various Firefox-tests. All-in-all, I'd be fine with keeping the DOM events only for the `MOZCENTRAL` target and gated on `Cu.isInAutomation` (or similar) rather than a preference.
[2] I wouldn't expect any *real* bugs in a custom implementation, simply based on event ordering, but it nonetheless seem like a good idea if any "external" events are still handled last.
2020-02-27 07:33:27 +09:00
|
|
|
this.eventBus._on("spreadmodechanged", spreadModeChanged);
|
2018-06-30 21:54:33 +09:00
|
|
|
|
Re-factor the `EventBus` to allow servicing of "external" event listeners *after* the viewer components have updated
Since the goal has always been, essentially since the `EventBus` abstraction was added, to remove all dispatching of DOM events[1] from the viewer components this patch tries to address one thing that came up when updating the examples:
The DOM events are always dispatched last, and it's thus guaranteed that all internal event listeners have been invoked first.
However, there's no such guarantees with the general `EventBus` functionality and the order in which event listeners are invoked is *not* specified. With the promotion of the `EventBus` in the examples, over DOM events, it seems like a good idea to at least *try* to keep this ordering invariant[2] intact.
Obviously this won't prevent anyone from manually calling the new *internal* viewer component methods on the `EventBus`, but hopefully that won't be too common since any existing third-party code would obviously use the `on`/`off` methods and that all of the examples shows the *correct* usage (which should be similarily documented on the "Third party viewer usage" Wiki-page).
---
[1] Looking at the various Firefox-tests, I'm not sure that it'll be possible to (easily) re-write all of them to not rely on DOM events (since getting access to `PDFViewerApplication` might be generally difficult/messy depending on scopes).
In any case, even if technically feasible, it would most likely add *a lot* of complication that may not be desireable in the various Firefox-tests. All-in-all, I'd be fine with keeping the DOM events only for the `MOZCENTRAL` target and gated on `Cu.isInAutomation` (or similar) rather than a preference.
[2] I wouldn't expect any *real* bugs in a custom implementation, simply based on event ordering, but it nonetheless seem like a good idea if any "external" events are still handled last.
2020-02-27 07:33:27 +09:00
|
|
|
this.eventBus._on("secondarytoolbarreset", evt => {
|
2018-06-30 21:54:33 +09:00
|
|
|
if (evt.source === this) {
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
spreadModeChanged({ mode: SpreadMode.NONE });
|
2018-06-30 21:54:33 +09:00
|
|
|
}
|
2018-05-15 12:10:32 +09:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2017-05-08 04:43:50 +09:00
|
|
|
open() {
|
|
|
|
if (this.opened) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.opened = true;
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
this.toggleButton.classList.add("toggled");
|
2021-02-02 07:16:20 +09:00
|
|
|
this.toggleButton.setAttribute("aria-expanded", "true");
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
this.toolbar.classList.remove("hidden");
|
2017-05-08 04:43:50 +09:00
|
|
|
}
|
2016-09-08 19:35:49 +09:00
|
|
|
|
2017-05-08 04:43:50 +09:00
|
|
|
close() {
|
|
|
|
if (!this.opened) {
|
|
|
|
return;
|
2013-09-05 06:48:31 +09:00
|
|
|
}
|
2017-05-08 04:43:50 +09:00
|
|
|
this.opened = false;
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
this.toolbar.classList.add("hidden");
|
|
|
|
this.toggleButton.classList.remove("toggled");
|
2021-02-02 07:16:20 +09:00
|
|
|
this.toggleButton.setAttribute("aria-expanded", "false");
|
2017-05-08 04:43:50 +09:00
|
|
|
}
|
2016-05-11 08:31:03 +09:00
|
|
|
|
2017-05-08 04:43:50 +09:00
|
|
|
toggle() {
|
|
|
|
if (this.opened) {
|
|
|
|
this.close();
|
|
|
|
} else {
|
|
|
|
this.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-04-09 02:34:27 +09:00
|
|
|
|
Enable auto-formatting of the entire code-base using Prettier (issue 11444)
Note that Prettier, purposely, has only limited [configuration options](https://prettier.io/docs/en/options.html). The configuration file is based on [the one in `mozilla central`](https://searchfox.org/mozilla-central/source/.prettierrc) with just a few additions (to avoid future breakage if the defaults ever changes).
Prettier is being used for a couple of reasons:
- To be consistent with `mozilla-central`, where Prettier is already in use across the tree.
- To ensure a *consistent* coding style everywhere, which is automatically enforced during linting (since Prettier is used as an ESLint plugin). This thus ends "all" formatting disussions once and for all, removing the need for review comments on most stylistic matters.
Many ESLint options are now redundant, and I've tried my best to remove all the now unnecessary options (but I may have missed some).
Note also that since Prettier considers the `printWidth` option as a guide, rather than a hard rule, this patch resorts to a small hack in the ESLint config to ensure that *comments* won't become too long.
*Please note:* This patch is generated automatically, by appending the `--fix` argument to the ESLint call used in the `gulp lint` task. It will thus require some additional clean-up, which will be done in a *separate* commit.
(On a more personal note, I'll readily admit that some of the changes Prettier makes are *extremely* ugly. However, in the name of consistency we'll probably have to live with that.)
2019-12-25 23:59:37 +09:00
|
|
|
export { SecondaryToolbar };
|