mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-04-13 08:44:02 +02:00
Use L10n.prototype.getDirection rather than querying the DOM, when initializing the CommentManager instance
Hopefully I'm not misunderstanding why it was written like that, however using an existing method should be a tiny bit more efficient than querying the DOM.
This commit is contained in:
parent
afa8a07a2b
commit
0d131f0957
@ -500,9 +500,6 @@ const PDFViewerApplication = {
|
||||
)
|
||||
: null;
|
||||
|
||||
const ltr = appConfig.viewerContainer
|
||||
? getComputedStyle(appConfig.viewerContainer).direction === "ltr"
|
||||
: true;
|
||||
const commentManager =
|
||||
AppOptions.get("enableComment") && appConfig.editCommentDialog
|
||||
? new CommentManager(
|
||||
@ -532,7 +529,7 @@ const PDFViewerApplication = {
|
||||
eventBus,
|
||||
linkService,
|
||||
overlayManager,
|
||||
ltr,
|
||||
/* ltr = */ l10n.getDirection() === "ltr",
|
||||
hasForcedColors
|
||||
)
|
||||
: null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user