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

add optional width and height for collapsed minimap #73

Merged
merged 1 commit into from
Jan 23, 2015
Merged

add optional width and height for collapsed minimap #73

merged 1 commit into from
Jan 23, 2015

Conversation

edelater
Copy link
Contributor

A small change to optionally set the height/width for the collapsed minimap.

I have a lot of leaflet controls on my maps, and it looks nicer if they all have the seem look-and-feel (tm).

@robpvn
Copy link
Contributor

robpvn commented Jan 16, 2015

Seems straightforward enough, but how does the arrow icon look if you set very large or ver small collapsed sizes?

@edelater
Copy link
Contributor Author

With larger sizes either:

  • accept the default. i.e. a small arrow, and a really small preview of the map
  • overwrite the css for .leaflet-control-minimap-toggle-display:
.leaflet-control-minimap-toggle-display {
    height: 26px;
    width: 26px;
    background-size: 26px;
}

Up to 50px still looks reasonable. beyond that size, the image should be changed as well.

For smaller sizes the css for .leaflet-control-minimap-toggle-display should be overwritten by the user.

It's also possible to have a larger collapsed size than expanded size. But I assume some sanity with the user :-)

@robpvn
Copy link
Contributor

robpvn commented Jan 22, 2015

It seems that the change is not so great if it can lead to problems like that where things either look weird or you have to edit the CSS. (If you have to edit the CSS to make things work you may as well just edit all the CSS rather than have some of it as an option and some as manual edits...) So I think I'd rather want to revamp the icon in general to be SVG (as per issue #56) so that it can scale easily, and solve several problems at once.

@robpvn robpvn closed this Jan 22, 2015
@robpvn robpvn mentioned this pull request Jan 22, 2015
3 tasks
@robpvn
Copy link
Contributor

robpvn commented Jan 22, 2015

Actually it looks like I'll be using exactly your code for some of it, so to give credit where credit is due I'll reopen this PR. 👍

@robpvn robpvn reopened this Jan 22, 2015
@robpvn robpvn merged commit ca36a74 into Norkart:master Jan 23, 2015
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.

None yet

2 participants