Permalink
Commits on Sep 18, 2010
  1. Merge 'git@github.com:mbostock/polymaps.git'

    Mike Bostock
    Mike Bostock committed Sep 18, 2010
  2. getBoundingClientRect is broken in WebKit nightly.

    Mike Bostock
    Mike Bostock committed Sep 18, 2010
    However, getClientRects()[0] appears to do what we want, still.
Commits on Sep 15, 2010
  1. Checkpoint documentation updates.

    Mike Bostock
    Mike Bostock committed Sep 15, 2010
  2. Add stylist.

    Mike Bostock
    Mike Bostock committed Sep 15, 2010
    The stylist is a simple, Protovis-like way to style GeoJSON tiles dynamically.
    Stylists can be registered as "load" or "show" event handlers, and set dynamic
    attributes, styles and titles on GeoJSON feature elements. The attribute, style
    and title values are computed as functions of the associated data.
Commits on Sep 9, 2010
  1. Allow geoJson.clip to be set after add.

    Mike Bostock
    Mike Bostock committed Sep 9, 2010
    Setting geoJson.tile(false) also explicitly, rather than implicitly, disables
    clipping. The size of the clipping rect is inferred from the tile size when the
    map is set (as before); this may change in the future if the map dispatches an
    event when the tile size changes.
    
    Also in this commit, the features associated with a geoJson tile are now
    accessible as the `features` attribute of the tile. This is distinct from the
    `features` attribute of the event, which only includes the updated features.
Commits on Sep 8, 2010
  1. Allow layers to be re-configured post-add.

    Mike Bostock
    Mike Bostock committed Sep 8, 2010
    The following layer properties can now be changed after add:
    
      layer.zoom
      layer.tile
      image.url
      geoJson.url
      geoJson.features
    
    These changes are enabled using the new `cache.clear()` method, and the
    corresponding `layer.reload()` method which clears the cache before reloading
    the currently-visible tiles.
    
    Also in this commit, geoJson.show and geoJson.reshow return `this`.
Commits on Sep 7, 2010
  1. Wheel now supports zoom mode "location".

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
  2. Oops, forgot generated files.

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
  3. Upgrade website to 2.1.1.

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
  4. Fix bug in layer.visible. #operatorprecedencefail

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
  5. Add missing link to map.zoomBy. Add .htaccess.

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
  6. Update website to 2.1.0.

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
  7. Update documentation to 2.1.0.

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
  8. Merge branch 'integrate'

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
  9. Merge branch 'master' of github.com:mbostock/polymaps into integrate

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
    Conflicts:
    	src/start.js
  10. Fix a bug in previous commit re. layer ID.

    Mike Bostock
    Mike Bostock committed Sep 7, 2010
Commits on Sep 3, 2010
  1. Oops forgot to included generated files.

    Mike Bostock
    Mike Bostock committed Sep 3, 2010
  2. Apply the zoom transform after the affine transform.

    Mike Bostock
    Mike Bostock committed Sep 3, 2010
    This way, the zoom transform is computed based on the actual zoom level, after
    the affine transform is applied.
Commits on Sep 2, 2010
  1. Remove cruft.

    Mike Bostock
    Mike Bostock committed Sep 2, 2010
  2. Shift-drag to set map extent.

    Mike Bostock
    Mike Bostock committed Sep 2, 2010
    This functionality is added to the `compass` control, which at first glance
    might seem weird, but it provides a convenient place for the dragging rect (on
    top of the other layers), and can also inherit the compass styling. This
    functionality is built on top of the map's new `extent` method, which takes a
    two-element location array, similar to `centerRange`.
    
    In a future change, it would be nice to add key listeners to the compass
    control, so that the escape key can cancel the shift-drag operation, and the
    space key can move the bounds rather than resize them. You might also want to
    floor the zoom level after setting the extent. And maybe a way to turn off
    shift-dragging if the functionality is not desired.
  3. More efficient zoom level transitions.

    Mike Bostock
    Mike Bostock committed Sep 2, 2010
    Previously, zooming in by one caused all the currently-displayed tiles in level
    0 to be re-added to the layer's -1 group element. We can avoid these adds (and
    similarly on zooming out) if we rename the level 0 group to be the new level -1
    group; however, we have to be careful to reorder the levels to maintain the
    relative order: -4, -3, -2, -1, +2, +1, 0.
    
    In addition to being more efficient, this will hopefully avoid some image
    flickering that occurs when changing zoom levels. It appears that the SVG client
    discards images when they are re-added; by avoiding the re-add on both the image
    tiles and the level 0 group element, we can hopefully avoid any flicker!
    
    This commit also changes the layer implementation to initialize its container
    (and levels) upon construction, rather than waiting until the map is specified.
    This simplifies some of the startup logic and paves the way for eliminating the
    init hook.
Commits on Sep 1, 2010
  1. Stash a reference to the (HTML) Image object.

    Mike Bostock
    Mike Bostock committed Sep 1, 2010
    It appears that even if you have a reference to an SVG image object, the browser
    can discard the image from the cache. If we store a reference to the HTML image
    object on the tile, then the browser is forced to keep the image in memory,
    which avoids flickering.
  2. Zoom methods for wheel and dblclick.

    Mike Bostock
    Mike Bostock committed Sep 1, 2010
    The zoom method can now be set to "center", which causes these controls to zoom
    around the center point rather than the mouse location. The default is "mouse"
    which is the previous behavior.
Commits on Aug 31, 2010
  1. Merge branch 'master' of github.com:mbostock/polymaps

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
    Conflicts:
    	polymaps.min.js
    	src/start.js
  2. Use keypress events for arrow zooming.

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
    The plus and minus key codes are not consistent across browsers. The char codes
    appear to be more consistent, so we use those; note that this also has the
    side-effect of enabling repeated zooming if the plus or minus key is held down.
    This makes zooming more consistent with the current (custom repeating) pan
    behavior.
  3. Merge branch 'integrate'

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
  4. Clarify add/remove documentation.

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
    These controls now support removal.
  5. Clarify `map.zoomRange` documentation.

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
    The zoom range is now allowed to be null.
  6. Clarify documentation regarding geoJson.url.

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
  7. Allow top-level GeoJSON Feature & Geometry objects.

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
    Previously, the GeoJSON layer required that the loaded JSON data be a
    FeatureCollection object. Now we also support top-level Feature and Geometry
    objects. Note that a top-level Geometry object is wrapped in a Feature for API
    compatibility.
  8. Disable GeoJSON tiling if URL is simple.

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
    If the GeoJSON layer's URL is specified as a string and is not a template, i.e.,
    it does not contain substitution variables such as {Z} or {B}, we now implicitly
    disable tiling as a side-effect. I'm not a huge fan of silent side-effects, but
    this is consistent with the behavior for the existing `features` property.
    
    Note that the image layer has a similar check; however, the image layer is still
    tiled with simple URLs, but the images skip the request queue since the same
    image appears in every tile.
  9. Allow the map's zoomRange to be null.

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
    This eliminates any zoom-level constraints, providing symmetry with the map's
    centerRange, which can also be null. This commit also includes a couple fixes
    where the code assumed the zoom level is nonnegative.
  10. Mouse wheel precision, take 6.

    Mike Bostock
    Mike Bostock committed Aug 31, 2010
    The wheelDelta >= 4800 check didn't work so well on some devices since the mouse
    wheel event can be delayed by redraw, causing the scroll amount to build up. So
    now we look at the time delta since the last event before deciding whether the
    event is suspiciously large.
Commits on Aug 28, 2010
  1. Quieter, more peaceful Makefile.

    Mike Bostock
    Mike Bostock committed Aug 28, 2010
Commits on Aug 27, 2010
  1. Fixes for adding/removing/restyling controls.

    Mike Bostock
    Mike Bostock committed Aug 27, 2010
    The `arrow`, `drag`, `grid`, `hash`, `wheel` and `dblclick` controls can now be
    removed from the map and re-added to a new (or the same) map. The same is true
    of the `compass` control, which also supports changing the style properties
    (e.g., `radius`) after adding the compass to a map.