|
1 | | -import React, {PropTypes as T} from 'react'; |
| 1 | +import React from 'react' |
| 2 | +import PropTypes from 'prop-types' |
2 | 3 | import ReactDOM from 'react-dom' |
3 | 4 | import { camelize } from './lib/String' |
4 | 5 | import {makeCancelable} from './lib/cancelablePromise' |
@@ -154,7 +155,7 @@ export class Map extends React.Component { |
154 | 155 |
|
155 | 156 | Object.keys(mapConfig).forEach((key) => { |
156 | 157 | // Allow to configure mapConfig with 'false' |
157 | | - if (mapConfig[key] == null) { |
| 158 | + if (mapConfig[key] === null) { |
158 | 159 | delete mapConfig[key]; |
159 | 160 | } |
160 | 161 | }); |
@@ -246,36 +247,36 @@ export class Map extends React.Component { |
246 | 247 | }; |
247 | 248 |
|
248 | 249 | Map.propTypes = { |
249 | | - google: T.object, |
250 | | - zoom: T.number, |
251 | | - centerAroundCurrentLocation: T.bool, |
252 | | - center: T.object, |
253 | | - initialCenter: T.object, |
254 | | - className: T.string, |
255 | | - style: T.object, |
256 | | - containerStyle: T.object, |
257 | | - visible: T.bool, |
258 | | - mapType: T.string, |
259 | | - maxZoom: T.number, |
260 | | - minZoom: T.number, |
261 | | - clickableIcons: T.bool, |
262 | | - disableDefaultUI: T.bool, |
263 | | - zoomControl: T.bool, |
264 | | - mapTypeControl: T.bool, |
265 | | - scaleControl: T.bool, |
266 | | - streetViewControl: T.bool, |
267 | | - panControl: T.bool, |
268 | | - rotateControl: T.bool, |
269 | | - scrollwheel: T.bool, |
270 | | - draggable: T.bool, |
271 | | - keyboardShortcuts: T.bool, |
272 | | - disableDoubleClickZoom: T.bool, |
273 | | - noClear: T.bool, |
274 | | - styles: T.array, |
275 | | - gestureHandling: T.string |
| 250 | + google: PropTypes.object, |
| 251 | + zoom: PropTypes.number, |
| 252 | + centerAroundCurrentLocation: PropTypes.bool, |
| 253 | + center: PropTypes.object, |
| 254 | + initialCenter: PropTypes.object, |
| 255 | + className: PropTypes.string, |
| 256 | + style: PropTypes.object, |
| 257 | + containerStyle: PropTypes.object, |
| 258 | + visible: PropTypes.bool, |
| 259 | + mapType: PropTypes.string, |
| 260 | + maxZoom: PropTypes.number, |
| 261 | + minZoom: PropTypes.number, |
| 262 | + clickableIcons: PropTypes.bool, |
| 263 | + disableDefaultUI: PropTypes.bool, |
| 264 | + zoomControl: PropTypes.bool, |
| 265 | + mapTypeControl: PropTypes.bool, |
| 266 | + scaleControl: PropTypes.bool, |
| 267 | + streetViewControl: PropTypes.bool, |
| 268 | + panControl: PropTypes.bool, |
| 269 | + rotateControl: PropTypes.bool, |
| 270 | + scrollwheel: PropTypes.bool, |
| 271 | + draggable: PropTypes.bool, |
| 272 | + keyboardShortcuts: PropTypes.bool, |
| 273 | + disableDoubleClickZoom: PropTypes.bool, |
| 274 | + noClear: PropTypes.bool, |
| 275 | + styles: PropTypes.array, |
| 276 | + gestureHandling: PropTypes.string |
276 | 277 | } |
277 | 278 |
|
278 | | -evtNames.forEach(e => Map.propTypes[camelize(e)] = T.func) |
| 279 | +evtNames.forEach(e => Map.propTypes[camelize(e)] = PropTypes.func) |
279 | 280 |
|
280 | 281 | Map.defaultProps = { |
281 | 282 | zoom: 14, |
|
0 commit comments