Commit ceb0acce authored by Qiu Xiang's avatar Qiu Xiang

优化 Overlay 更新通知

parent 8d35f57c
......@@ -2,8 +2,6 @@ import React, {PropTypes, Component} from 'react'
import {
View,
UIManager,
Platform,
NativeModules,
findNodeHandle,
requireNativeComponent,
} from 'react-native'
......@@ -13,7 +11,7 @@ class Overlay extends Component {
...View.propTypes,
}
componentDidUpdate() {
_update() {
setTimeout(() => {
UIManager.dispatchViewManagerCommand(
findNodeHandle(this),
......@@ -23,6 +21,9 @@ class Overlay extends Component {
}, 0)
}
componentDidUpdate = this._update
componentDidMount = this._update
render() {
return <AMapOverlay {...this.props}/>
}
......
......@@ -40,7 +40,6 @@ export default class MarkerExample extends Component {
/>
<Marker
icon='green'
infoWindowWidth={100}
coordinate={{
latitude: 39.806901,
longitude: 116.297972,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment