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

Added functionality for adding frame around image in admin #1251

Merged
merged 7 commits into from
Jan 10, 2023

Conversation

OlofSvahnVbg
Copy link
Collaborator

You can now select in admin to add a dark gray frame around the map image in the pdf. The option to add frame is only available there, and not for the user.

@OlofSvahnVbg OlofSvahnVbg added the new feature Request for adding/changing functionality label Dec 1, 2022
@OlofSvahnVbg OlofSvahnVbg added this to the 3.x milestone Dec 1, 2022
@OlofSvahnVbg OlofSvahnVbg self-assigned this Dec 1, 2022
@jacobwod
Copy link
Member

jacobwod commented Dec 2, 2022

Nice!

Just one more thing: I don't want to be picky, but how does the frame affect the print area? I.e., when the frame is visible, do we reflect that in print preview (the "orange rectangle" that user can move around and select what will be printed).

I know that this is just a minor addition but when you zoom in close enough, the width of the frame can affect the viewport substantially. We've had users complaining about "Print does not print exactly what I selected!" before… 😄

@OlofSvahnVbg
Copy link
Collaborator Author

Good point. I'll check on it.

@OlofSvahnVbg
Copy link
Collaborator Author

image

image

@OlofSvahnVbg
Copy link
Collaborator Author

The frame doesnt seem to obscure any map area, not that I can see at least. What do you think?

@jacobwod
Copy link
Member

jacobwod commented Dec 2, 2022

It should, I think… :) Unless you've enabled useMargin in options, of course. That way the frame will end up inside the margin and not affect the map. But if useMargin is false, the frame should obstruct some part of the map?

@OlofSvahnVbg
Copy link
Collaborator Author

Ok, so I added border to image without margins and reworked a segment of code to a if-tree (not my best work but I think it's easier to read now). This seems to work, the border does not obscure the map image when choosing any scale or margin size.

@jacobwod
Copy link
Member

jacobwod commented Dec 6, 2022

Looks good @OlofSvahnVbg, it seems like you need to merge in develop as there's one conflict in PrintModel currently. 👍

@jacobwod
Copy link
Member

Just wondering if you and @jesade-vbg already had a look at this together, or if we should await @jesade-vbg's review?

@jacobwod jacobwod self-requested a review December 14, 2022 08:58
@jacobwod jacobwod merged commit e1a18b0 into develop Jan 10, 2023
@jacobwod jacobwod deleted the feature/1202-BorderAroundImage branch January 10, 2023 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Request for adding/changing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants