Skip to content

Latest commit

 

History

History
313 lines (175 loc) · 13.9 KB

CHANGELOG.md

File metadata and controls

313 lines (175 loc) · 13.9 KB

<a name"2.0.3">

2.0.3 (2015-08-18)

Bug Fixes

  • OverlayView:
    • add invariant for mapPaneName (f102577c)
    • add invariant checking for position props (757bda08)
    • add position to propTypes (1fc968ad, closes #99)
  • package.json: remove object-path (ee55b7a5)

<a name"2.0.2">

2.0.2 (2015-08-08)

Bug Fixes

  • GoogleMap: remove propTypes validation on children (0e417015)
  • OverlayView: props.{default}mapPaneName should not be required (702a5710)

<a name"2.0.1">

2.0.1 (2015-08-08)

Bug Fixes

  • Rectangle: remove unnecessary underscore (13312273, closes #90)

<a name"2.0.0">

2.0.0 (2015-08-07)

Features

  • InfoWindow: add ReactElement child as content support (2c0dc026, closes #69)
  • Rectangle: add new componet (4511d87d, closes #80)

Breaking Changes

  • This commit rewrite this module from scratch.

  • GoogleMaps -> GoogleMap

    • (Others Component names are the same)
  • OverlayView - Now only accepts single child

  • Remove asynchronous loading support

  • The props are not directly served as options for all google.maps instance.

    • Instead, we convert setters to props and also expose getters on component instance.
  • To set an option directly, you can now pass options object just the same way as using Google Maps JavaScript APIs.

  • Expose props have two representation: controlled & uncontrolled

    • uncontrolled props will have a default${ PropName } name
    • controlled props will be ${ propName } as you expected
  • Uncontrolled props will be used only when the instance first mounted

  • Controlled props will call its corresponding setters every time rendered

MIGRATION GUIDE:

It introduces controlled property concept into the module. Most of the case, your application would like to have uncontrolled property. So change your component like this:

Before (v1.x.x):

<Marker
      key={this.props.key}
      position={this.props.position}
      animation={this.props.animation}
      onRightclick={this.handleMarkerRightclick} />

After (v2.x.x):

<Marker
      key={this.props.key}
      defaultPosition={this.props.position}
      defaultAnimation={this.props.animation}
      onRightclick={this.handleMarkerRightclick} />

The properties with default- prefix is uncontrolled property. It will only be set ONCE when the component is first-time mounted. Any further changes to your React props/state will NOT affect this marker (So it's uncontrolled from the view of React). Who can change the marker, you may ask. The answer is, only the component from google.maps.

But sometimes, we may want the marker's position changed according to current state. In that case, you have to provide controlled property to the <Marker [position={this.state.position}>. By doing so, the marker's position will change every time the React props/state changes. However, it will not intercept the changes made by the component from google.maps. This is because for the <Marker> itself, it doesn't know what events from google.maps will change its component. So the consumer who uses "react-google-maps" will have to manually handle this in their codebase.

(081d03f1)

<a name"1.7.1">

1.7.1 (2015-07-01)

Bug Fixes

1.7.0 (2015-06-19)

Features

  • GoogleMaps: specify map bounds via declarative props.bounds (b1333c52, closes #64)

1.6.0 (2015-06-19)

Features

  • OverlayView: add OverlayView component by @petebrowne (f0c56ecb, closes #63)

1.5.1 (2015-06-17)

1.5.0 (2015-06-17)

Bug Fixes

  • VirtualContainer: propTypes.children should be renderable (a3d73af4)

Features

  • GoogleMaps: render VirtualContainer as children (c9e19828, closes #61)

1.4.0 (2015-06-17)

Bug Fixes

  • SimpleChildComponent: Make sure to only animate markers on the first run. (65aec078)
  • src: eslint issues (adf3764b)

1.3.1 (2015-05-21)

1.3.0 (2015-05-21)

Features

  • InfoBox: Support for InfoBox (613e5ef5)

1.2.0 (2015-05-15)

Features

  • DrawingManager: Support for Drawing API (9b3cbeba)
  • SimpleChildComponent:

1.1.2 (2015-05-06)

Bug Fixes

  • GoogleMaps: constructor should use spread operator (d8e30af6)
  • SimpleChildComponent: prevent removal of child during update (834d399b)

1.1.1 (2015-05-01)

Bug Fixes

  • VirtualContainer: preserve ref for React.cloneElement (3d3be964)

1.1.0 (2015-04-30)

Features

  • GoogleMaps:
    • get rid of mapProps (7e338c2a)
    • render child components inside VirtualContainer (f07eb4b4)

Breaking Changes

  • mapProps is no longer needed

    since map children components are now rendered inside a virtual container, we don't need funky wrapper div anymore.

    Before:

    After:

(7e338c2a)

1.0.1 (2015-04-30)

Bug Fixes

  • Marker: dont wrap children inside noscript tag (5d9bbf0a)
  • package.json: test (7b54b54e)

1.0.0 (2015-04-28)

Bug Fixes

  • package.json: add peerDependencies (15166996)

Features

0.2.5 (2015-03-11)

Features

  • Map:

0.2.4 (2014-12-16)

Features

  • Map: expose fitBounds as public API (c64da722)

0.2.3 (2014-11-27)

0.2.2 (2014-11-20)

Bug Fixes

  • Map: only pass id, className and style from props (284ab299)

0.2.1 (2014-11-20)

0.2.0 (2014-11-20)

Bug Fixes

  • ChildMixin: remove invalid_context and duplicated contextTypes (80110a23)
  • EventBindingMixin: pass instance when binding/unbinding (bb922794)
  • GoogleMapsMixin: respond to update of googleMapsApi (3b0a0e07)
  • InfoWindow:
  • Map:
    • bind event once to component instance (fe2665ae)
    • add api loaded state to _initialized (0e0192ba)
  • Marker: event listeners (f878c002)
  • Polygon: event listeners (5f98d0e1)
  • create_child_component: event binding for child components (f4b1b022)
  • expose_getters_from: should iterate all keys in prototype chain (5a89ed1c)

Features

  • ChildMixin:
    • expose instance getters from prototype (bad5456f)
    • add invalid_context to check before operations (5d33c309)
    • make Map and Marker use context apis (9514b484)
  • EventBindingMixin:
    • move event names definition to caller (4c5ca5d1)
    • hook to correct lifecycle events (4ef9fdea)
    • extract event binding part out (c12ddd4a)
  • GoogleMap:
    • hookup event listeners to map instance (ff1a7a8a)
    • initialize google map component (80e7fd84)
  • GoogleMapsMixin:
    • move into mixins subfolder (0f10be83)
    • create mixin for context usage (526ca9d8)
  • InfoWindow: component with example (e227edf8)
  • Map:
    • expose panBy, panTo and panToBounds as public interfaces (6ccd1284)
    • stateless map component (3d3aa153)
    • configureable id, className and style (420e83bb)
    • setOptions when componentDidUpdate (8d07bd34)
    • extract out Map component (8c5429c7)
  • Marker: update options when componentDidUpdate (0a7e490f)
  • Polygon: add component and client example (556b9be9)
  • Polyline: component with example (d0b802bb)
  • index: create common child components by factory (43b791d2)