-
Notifications
You must be signed in to change notification settings - Fork 688
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
implement the fix the grid may be redefined in a document #492
Comments
1 vote for merging this into Prawn - or update the manual to tell that grid is per document. |
I am not super familiar with the grid code, but having it be global is definitely weird when most things in Prawn can be nested relative to a bounding box. If you want to work on a patch or update the documentation, it'd certainly be welcome. Please submit a pull request, and let me know if you need help figuring out how to implement it! |
The update bwl21 has posted sort of makes sense - I have just implemented in my app. I can't really see that applying that fix should break anything. As far as I can see the problem is somewhere around https://github.com/prawnpdf/prawn/blob/stable/lib/prawn/layout/grid.rb#L20 which could be a performance thing but has the drawback that the boxes are not rewritten when a new grid is defined. I'll try to update the manual to say that grid is defined per document. |
What we have here isn't a patch, it's just showing a line of code we could change if we wanted to prepare a patch. It has no tests or examples, and so it's not in a reviewable state. If we simply changed this line in Prawn, nothing would stop us from breaking it or misunderstanding the intention in a future release. A pull request with tests and a clear example, and any necessary documentation updates is definitely worth reviewing though! |
The hint in https://groups.google.com/forum/?fromgroups#!topic/prawn-ruby/nYfR9EBvygk should be implmentd.
I have created an application to show calendars. This is based on grid, and expected that I can redefine the grid within a Document.boundingbox.
In my application I have added:
This allows to redefine the grid. Could this be part of the official Prawn.
The text was updated successfully, but these errors were encountered: