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

rework b.width for getting the width of several spreads #54

Closed
ff6347 opened this issue Jul 18, 2016 · 2 comments
Closed

rework b.width for getting the width of several spreads #54

ff6347 opened this issue Jul 18, 2016 · 2 comments
Labels
Milestone

Comments

@ff6347
Copy link
Member

ff6347 commented Jul 18, 2016

as mentioned in #50

@ff6347 ff6347 added the feature label Jul 18, 2016
@ff6347 ff6347 added this to the Features milestone Jul 18, 2016
@trych
Copy link
Contributor

trych commented Jul 18, 2016

Ok, I did not realize that b.width always refers to the canvas width and that it is closely related to the whole canvas mode business. I always assumed, it simply returns the width of the current page (as is stated in the reference).

I would suggest the following improvements:

  1. Make b.width refer to the canvas width specifically and correct the description in the reference.
  2. Make b.width work for spreads with more than 2 pages. This probably includes changing the canvas modes b.FACING_PAGES, b.FACING_MARGINS and b.FACING_BLEEDS to b.SPREAD, b.SPREAD_MARGINS and b.SPREAD_BLEEDS (or is it important that they are called Facing pages?). For backwards compatibility we could either keep b.FACING_PAGES & Co. to still work, or we keep the old names and just change how the methods work internally.
  3. Introduce a new method b.pageWidth that returns the page width, independently from the current canvas.
  4. Introduce a new method b.spreadWidth that returns the spread, no matter how many pages, independently from the current canvas.

@trych
Copy link
Contributor

trych commented Apr 23, 2018

This can be closed, as width now returns the correct value referring to the currently set canvas mode. My suggestions about pageWidth and spreadWidth from above could rather be solved via bounds() (see #276).

@trych trych closed this as completed Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants