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 Dialog Responsive on Mobile Devices #1095

Open
1Map opened this issue Aug 6, 2024 · 1 comment
Open

Print Dialog Responsive on Mobile Devices #1095

1Map opened this issue Aug 6, 2024 · 1 comment
Labels

Comments

@1Map
Copy link

1Map commented Aug 6, 2024

How can the print parameters settings panel (Left panel) be collapsed/expanded (Responsive) when on mobile devices?

image
@Viglino
Copy link
Owner

Viglino commented Aug 6, 2024

You can use CSS and and media query to make it more responsible.
The current CSS only change the width of the panel:

@media (max-width: 25em) {
    .ol-ext-print-dialog .ol-print-param {
        width: 13em;
    }
}
@media (max-width: 25em) {
    .ol-ext-print-dialog .ol-print-map {
        width: calc(100% - 13em);
    }
}

You can add a button to toggle the panel using getUserElement (or getContentElement):

var bt = document.createElement('BUTTON')
bt.innerText = 'ok'
printControl.getUserElement().appendChild(bt)

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