Closed mnquintana closed 9 years ago
Wow, your editor sure didn't pull any punches! But I like the way you solved this, it's an elegant solution. Thanks!
As you say, the indentation has become very messy because I haven't been consistent about enforcing style. So if you want to do the work of normalising everything into tabs and fixing errant indentation I would be very grateful. In other words, very :cool:.
Thanks! Do you prefer tabs or spaces? I'll try to get a style PR out soon.
Tabs are my kind of thing, at least that's how this repo started out!
Closes #94 Closes #77
This PR adds a new option,
centerFixed
, that fixes the MiniMap on a point, but still allows zooming. WhencenterFixed
is enabled, the MiniMap won't change when the main map is panned - only if it's zoomed, and when it's zoomed, the MiniMap will always zoom centered around the point passed on initialization.If you want to disable panning and zooming (ala #77), just initialize a MiniMap with both
centerFixed
andzoomLevelFixed
, like this:This PR also adds examples for creating both a MiniMap with a fixed center and a MiniMap with a fixed view (ie. no panning or zooming).
:memo: NOTE: The indentation in this file was already a bit of a mess (tabs and spaces mixed together) - I'd be happy to fix this and change it to use all tabs in another PR if that's everyone's preference, but I didn't want to do it in this one to keep the diff more readable. My editor also removed some trailing whitespace as I worked - if that's an issue, I can revert those changes too. Otherwise, I plan on submitting another PR to fix the formatting and stuff, if that would be :cool: