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

Print - toggle between map and print layout interactions #1181

Merged

Conversation

MattiasSp
Copy link
Contributor

Fixes #1157. Also part of #785.

  • Adds a new o-print-tools-left div section for print tools/buttons in the upper left.
  • Puts the current settings (Collapse) control in the o-print-tools-left section
  • Adds a second button (Button) control to the o-print-tools-left section that toggles between "no map interactions" and default map interactions
    • Including a new config option mapInteractionsActive to set whether map interactions should be enabled by default (true) or not. Default is false.

I'd happily take suggestions for the button icon (now using #fa-pencil-square).

I made some changes to css classes to accommodate the new o-print-tools-left div and the extra button. I also removed the class width-20 from the print-settings.template.js which fixes an issue where the print settings collapsible was too wide for some mobile screens. It would be great of I could get some help with testing on different screens and devices though :)

@MattiasSp
Copy link
Contributor Author

Here's a map for testing the behaviour: https://karta.haninge.se/devmaps/pr-print-map-vs-layout-interaction-toggle/

@mulfvik
Copy link
Contributor

mulfvik commented Mar 2, 2021

Nice work! The icon for the button is used in the editor for editing data, maybe it can be replaced with an map icon? Map on/off

@jokd
Copy link
Contributor

jokd commented Mar 2, 2021

Agree with mulfvik, well done and using a map icon would probably be better.
Works well on both desktop and my iPhone 8+!

@MattiasSp
Copy link
Contributor Author

FYI the icon fa-pencil was removed because it was a duplicate, so it's not removed completely.

@tonnyandersson
Copy link
Collaborator

I suggest using the Material Icons map icon instead (ic_map_24px), since most of the icons in the UI are from MI. But it seems it's not in the material-icons.svg sprite yet, so you will have to copy it from css\svg\vendors\material-sprites\svg-sprite-maps-symbol.svg.

@MattiasSp
Copy link
Contributor Author

Based on a user suggestion, perhaps I should change the tooltip text to something less technical, e g "Ändra kartans läge" instead of "Aktivera kartvyn". What do you think?

@jokd
Copy link
Contributor

jokd commented Mar 4, 2021

Sounds good!

@jokd jokd merged commit fb23d80 into origo-map:master Mar 15, 2021
@MattiasSp MattiasSp deleted the print-map-vs-layout-interaction-toggle branch May 3, 2021 14:05
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.

Print - Use new button in print control to toggle map interaction
4 participants