Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes circular dependency of secondary toolbar on app.js. #7266

Merged
merged 1 commit into from
Apr 29, 2016

Conversation

yurydelendik
Copy link
Contributor

Fixes #7204

}
var appConfig = PDFViewerApplication.appConfig;
if (PDFViewerApplication.pdfViewer.containsElement(evt.target) ||
(appConfig.toolbar.container.contains(evt.target) &&
Copy link
Collaborator

@Snuffleupagus Snuffleupagus Apr 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is changing the current behaviour, was that indended?
Are you perhaps trying to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1211884 here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It goes along with changing event handles of toolbar icons to just call eventBus.dispatch (before they called secondary's handlers which were closing itself).

However, change ,false) => ,true) below might fix 1211884

@Snuffleupagus
Copy link
Collaborator

Should we change these lines as well: https://github.com/yurydelendik/pdf.js/blob/secondary/web/app.js#L281-L288? Perhaps something like this:

  { element: appConfig.fullscreen.contextFirstPage,
    handler: webViewerFirstPage },
  { element: appConfig.fullscreen.contextLastPage,
    handler: webViewerLastPage },
  { element: appConfig.fullscreen.contextPageRotateCw,
    handler: webViewerRotateCw },
  { element: appConfig.fullscreen.contextPageRotateCcw,
    handler: webViewerRotateCcw }

@yurydelendik
Copy link
Contributor Author

yurydelendik commented Apr 28, 2016

Should we change these lines as well: https://github.com/yurydelendik/pdf.js/blob/secondary/web/app.js#L281-L288?

The menu items shall generate eventBus commands -- changed the code to do just that.

@Snuffleupagus
Copy link
Collaborator

This line can be removed now too: https://github.com/mozilla/pdf.js/pull/7266/files#diff-529d1853ee1bba753a0fcb40ea778723L275.
Looks good so far, I'll do a final round of testing/reviewing tomorrow.

@Snuffleupagus Snuffleupagus self-assigned this Apr 28, 2016
@Snuffleupagus
Copy link
Collaborator

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.21.233.14:8877/9038ac11153e83f/output.txt

@Snuffleupagus Snuffleupagus merged commit 4968ac7 into mozilla:master Apr 29, 2016
@Snuffleupagus
Copy link
Collaborator

Looks good, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants