Per @tmcw's request, MM.Hash now throttles hash updates (like Wax). This means less frequent hash.replace() calls, which should make it nicer to use on browsers (*cough* IE) that do stupid things like play clicking sounds whenever the URL changes. Also, removed standalone Hash implementation from examples/hash, and made sure that the map gets an initial center & zoom so that it doesn't redirect to #0/0/0 if loaded without a hash.
My hunch about forcing CSS width and height on tile elements inside MM.moveElement() was wrong, and actually broke a lot of stuff. So I reversed it and fixed the sprite-tiles example layer class to give each tile an intrinsic size with a block-level "strut", which appears to work well. Also, the spotlight example has a nicer transition to it with a slight delay.
MM.moveElement() should always set style.width and style.height for elements with no intrinsic size. We could probably optimize this to ignore <img> elements, since those do have an intrinsic size; but currently not doing so breaks <div> elements, as used in the sprite-tiles example.
Got the anyscale example working again! And in the process... Renamed `MouseWheelHandler`'s "any" flag to "precise", as in `Map`. Also, updated the constructor to allow `(null, true|false)` as arguments so you can pass inline it in the `Map()` handlers array. Also, removed the "precise" argument from `MouseWheelHandler.init()`, since `Map` never initializes handlers with any additional arguments anyway.
…ayers-merge Conflicts: modestmaps.js modestmaps.min.js src/map.js
- Added an exception to `MapExtent.fromString()` to catch bad arguments. - Beefed up the extent-selector example with the ability to set the extent manually, snap to the map, and toggle the ability to drag the extent from its center.
The `MapExtent` constructor is a bit smarter now, in that it can accept two `Location` instances.