Skip to content

Commit

Permalink
Remove CSS variables feature-testing from PDFSidebarResizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Snuffleupagus committed Sep 9, 2020
1 parent 2594f0c commit b8c58c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
20 changes: 2 additions & 18 deletions web/pdf_sidebar_resizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PDFSidebarResizer {
* @param {IL10n} l10n - Localization service.
*/
constructor(options, eventBus, l10n = NullL10n) {
this.enabled = false;
this.enabled = true;
this.isRTL = false;
this.sidebarOpen = false;
this.doc = document.documentElement;
Expand All @@ -45,24 +45,8 @@ class PDFSidebarResizer {
this.outerContainer = options.outerContainer;
this.resizer = options.resizer;
this.eventBus = eventBus;
this.l10n = l10n;

if (
(typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) &&
(typeof CSS === "undefined" ||
typeof CSS.supports !== "function" ||
!CSS.supports(SIDEBAR_WIDTH_VAR, `calc(-1 * ${SIDEBAR_MIN_WIDTH}px)`))
) {
console.warn(
"PDFSidebarResizer: " +
"The browser does not support resizing of the sidebar."
);
return;
}
this.enabled = true;
this.resizer.classList.remove("hidden"); // Show the resizer DOM element.

this.l10n.getDirection().then(dir => {
l10n.getDirection().then(dir => {
this.isRTL = dir === "rtl";
});
this._addEventListeners();
Expand Down
2 changes: 1 addition & 1 deletion web/viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<div id="layersView" class="hidden">
</div>
</div>
<div id="sidebarResizer" class="hidden"></div>
<div id="sidebarResizer"></div>
</div> <!-- sidebarContainer -->

<div id="mainContainer">
Expand Down

0 comments on commit b8c58c6

Please sign in to comment.