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

Add 'Two Up View' #2395

Closed
wants to merge 7 commits into from
Closed

Add 'Two Up View' #2395

wants to merge 7 commits into from

Conversation

Moistly
Copy link
Contributor

@Moistly Moistly commented Nov 20, 2012

Use param twoup=true

Use param twoup=true
@Moistly Moistly mentioned this pull request Nov 20, 2012
@yurydelendik
Copy link
Contributor

General feedback:

  • No "Show Cover Page for Two Page View" option (Most of PDFs I have, usually start from cover);
  • No UI to exposed this option. You can use the context menu. Users will not know about 'twoup=true';
  • Misuse of the CONSTANT_NAMES for the variable.

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/9c390c91a523cdd/output.txt

@pdfjsbot
Copy link

@@ -30,6 +30,8 @@ var MAX_SCALE = 4.0;
var IMAGE_DIR = './images/';
var SETTINGS_MEMORY = 20;
var ANNOT_MIN_SIZE = 10;
var TWO_UP_VIEW = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

not a constant

@waddlesplash
Copy link
Contributor

Adobe Reader has the first page displayed by itself in two-up mode.
@yurydelendik do you think we should do this by default or have an option or leave it the way it is?

@yurydelendik
Copy link
Contributor

Adobe Reader has the first page displayed by itself in two-up mode.
@yurydelendik do you think we should do this by default or have an option or leave it the way it is?

By default will be good. But we still need to provide options to switch that off (as Reader does)

Added 'One Page View', 'Two Page View' and 'Show Cover Page in Two Page
View'. Added to context menu as sub menu under 'Page Display' (same as
Adobe Reader X).

Have used icon image to indicate which option selected (by default 'One
Page View' and 'Show Cover Page in Two Page View' are selected)

Can also use param #showcover=true|false

The context menu icon is a hardcoded path in both html and js, should/
could this be done in css?

Also an issue if you zoom in so that the width of 2 pages is greater
than viewport. Any suggestions? Expanding the sidebar also can result in
the same problem
Due to formatting with vs2012
</menu>


Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpicking: There's an extra line in here that consists only of whitespace.

@yurydelendik
Copy link
Contributor

Too many unrelated to the issue change in the code -- the pull request more likely to be rejected as is. Keep the solution short and change only code that needs to be changed; revert the changes made to unrelated code.


<menu label="Page Display">
<menuitem label="One Page View" id="one_page_view"
data-l10n-id="one_page_view" icon="images/contextMenu-tick.png" ></menuitem>
Copy link
Contributor

Choose a reason for hiding this comment

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

does the 'checked' attribute not working? https://developer.mozilla.org/en-US/docs/XUL/menuitem#a-checked

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've attempted to use the checked attribute, but having difficulty toggling the 'One page..' and 'Two page..' options. I have looked at https://developer.mozilla.org/en-US/docs/XUL/PopupGuide/MenuItems and https://developer.mozilla.org/en-US/docs/XUL/menuitem#a-checked but oncommand and/or autocheck="false" doesn't seem allow me to grammatically check or uncheck the states

Fixed zoom where width of 2 pages is greater than viewport

Attempted to use checkbox for menuitem, though cannot programatically
toggle 'One page' and 'Two page' view, possibly a bug? I've tried using
oncommand - will not fire, also autocheck="false" doesn't seem to do
anything
Changed menuitem type to "radio"
Now inserts br tags inbetween pages to ensure correct positioning
@kmindi kmindi mentioned this pull request Dec 3, 2012
@timvandermeij
Copy link
Contributor

Can someone explain why this has not been merged yet? It seems like a really useful feature to me and I would personally love to use it...

@gigaherz
Copy link
Contributor

gigaherz commented Feb 1, 2013

Some comments were never addressed, it seems. Most notably @yurydelendik's comment that the PR includes changes unrelated to the feature being implemented.

@waddlesplash
Copy link
Contributor

@Moistly are you still working on this? Or should someone else (like me) finish what you started?

@Moistly
Copy link
Contributor Author

Moistly commented Feb 2, 2013

I would be than happy for someone else to finish this off. Thanks

@waddlesplash waddlesplash mentioned this pull request Feb 2, 2013
10 tasks
@waddlesplash
Copy link
Contributor

Close this as I superseded it with #2660?

@gigaherz
Copy link
Contributor

gigaherz commented Feb 2, 2013

It can be reopened later if it's necessary.

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

Successfully merging this pull request may close these issues.

6 participants