-
Notifications
You must be signed in to change notification settings - Fork 416
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
Legends Print on new line - and other issues #33
Comments
Update: Like so: However, this doesn't fix this problem unless one, again, specifies "inline": true. I think that However, from the code, I can see the difficulty with that. I will have a go at fixing it, but cannot promise anything. Is the person who did that logic still around? If so, don't hesitate to contact me any time, as your insight might make fixing this problem a lot easier. The main point of this post is that Please correct me if I'm wrong but I had a chat to people at the office and they agreed with me. |
I don't know who wrote that code. It is likely a combination of people, though I can't say for sure. That said, your point makes sense to me (from the little I understand it). |
Effectively it make sense ! |
Thanks for the quick answers! Cool, so you think it makes sense to review a big portion of that code or even rewrite? It seems rather ugly to be honest. I was also planning to do some documentation and hopefully implement some unit tests while I'm at it. |
+1. On Mon, Mar 11, 2013 at 10:56 AM, Tim-Hinnerk Heuer <
|
Update: |
Update: |
Update: I'm basically implementing it now like this, but have changed significant parts of the code to something I would understand better. I calculate the widths and heights of things based on how they render onto a temporary PDF file. Otherwise, it doesn't seem possible to get accurate widths and heights of things. pdfPTable.getTotalHeight() returns 0 for tables that have data in them but are not rendered onto a "physical" PDF file. This just means that a file on disk has to be opened and written to but it can be deleted after the print is complete. |
Update: Anyway, the design decisions/conclusions are: backgroundColor: apologies, this actually works as it is currently. horizontalAlignment: (default) alignment of legend items fonts etc we keep. |
Hello,
Yes we need this, when we gets different legends from mapserver we obtain images at different size. For all other +1 :-) |
Can I assume that the iconMaxWidth/Height is a hard maximum and the defaultScale always makes the image smaller or equal in size than that. E.g. an image is 20x20pt, iconMaxWidth=40, iconMaxHeight=40, defaultScale=2.5, This makes the image 50x50pt but then the hard max of 40 is applied, so the image becomes 40x40pt. Another counter example would be an image is 20x20pt and the defaultScale=1.5. The picture becomes 30x30pt and iconMaxWidth/Height doesn't need to be applied because it is smaller. Please confirm. |
exactly :-) |
Update: |
Can close this as it is resolved. |
When printing legends and setting inline: true to give a maxHeight of the legend, so that legends are printed on a new column if they overflow, the legend chips are printed on the next line. In fact, as far as I remember, the new line problem also happens when inline: false is set.
If you need more info to reproduce, I can provide that when I have a bit more time.
The text was updated successfully, but these errors were encountered: