react-map-gl
Advanced tools
Comparing version 5.0.9 to 5.0.10
@@ -5,3 +5,3 @@ # CHANGELOG | ||
## 5.0.9 (Aug 12, 2019) | ||
## 5.0.10 (Aug 13, 2019) | ||
- React 16.9.0 deprecated lifecycles (#861) | ||
@@ -8,0 +8,0 @@ - remove deprecated react lifecycle methods (#863) |
@@ -155,2 +155,6 @@ "use strict"; | ||
if (isDragging !== _this.state.isDragging) { | ||
_this._updateInteractiveContext({ | ||
isDragging: isDragging | ||
}); | ||
_this.setState({ | ||
@@ -366,13 +370,2 @@ isDragging: isDragging | ||
}, { | ||
key: "componentWillUpdate", | ||
value: function componentWillUpdate(nextProps, nextState) { | ||
this._setControllerProps(nextProps); | ||
if (nextState.isDragging !== this.state.isDragging) { | ||
this._updateInteractiveContext({ | ||
isDragging: nextState.isDragging | ||
}); | ||
} | ||
} | ||
}, { | ||
key: "componentWillUnmount", | ||
@@ -396,6 +389,5 @@ value: function componentWillUnmount() { | ||
this._updateInteractiveContext({ | ||
onViewStateChange: props.onViewStateChange, | ||
onViewportChange: props.onViewportChange | ||
}); | ||
var context = this._interactiveContext; | ||
context.onViewportChange = props.onViewportChange; | ||
context.onViewStateChange = props.onViewStateChange; | ||
} | ||
@@ -452,2 +444,4 @@ }, { | ||
value: function render() { | ||
this._setControllerProps(this.props); | ||
var _this$props4 = this.props, | ||
@@ -454,0 +448,0 @@ width = _this$props4.width, |
@@ -127,2 +127,6 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
if (isDragging !== this.state.isDragging) { | ||
this._updateInteractiveContext({ | ||
isDragging | ||
}); | ||
this.setState({ | ||
@@ -340,12 +344,2 @@ isDragging | ||
componentWillUpdate(nextProps, nextState) { | ||
this._setControllerProps(nextProps); | ||
if (nextState.isDragging !== this.state.isDragging) { | ||
this._updateInteractiveContext({ | ||
isDragging: nextState.isDragging | ||
}); | ||
} | ||
} | ||
componentWillUnmount() { | ||
@@ -367,6 +361,5 @@ this._eventManager.destroy(); | ||
this._updateInteractiveContext({ | ||
onViewStateChange: props.onViewStateChange, | ||
onViewportChange: props.onViewportChange | ||
}); | ||
const context = this._interactiveContext; | ||
context.onViewportChange = props.onViewportChange; | ||
context.onViewStateChange = props.onViewStateChange; | ||
} | ||
@@ -419,2 +412,4 @@ | ||
render() { | ||
this._setControllerProps(this.props); | ||
const _this$props4 = this.props, | ||
@@ -421,0 +416,0 @@ width = _this$props4.width, |
@@ -142,2 +142,6 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
if (isDragging !== _this.state.isDragging) { | ||
_this._updateInteractiveContext({ | ||
isDragging: isDragging | ||
}); | ||
_this.setState({ | ||
@@ -362,13 +366,2 @@ isDragging: isDragging | ||
}, { | ||
key: "componentWillUpdate", | ||
value: function componentWillUpdate(nextProps, nextState) { | ||
this._setControllerProps(nextProps); | ||
if (nextState.isDragging !== this.state.isDragging) { | ||
this._updateInteractiveContext({ | ||
isDragging: nextState.isDragging | ||
}); | ||
} | ||
} | ||
}, { | ||
key: "componentWillUnmount", | ||
@@ -392,6 +385,5 @@ value: function componentWillUnmount() { | ||
this._updateInteractiveContext({ | ||
onViewStateChange: props.onViewStateChange, | ||
onViewportChange: props.onViewportChange | ||
}); | ||
var context = this._interactiveContext; | ||
context.onViewportChange = props.onViewportChange; | ||
context.onViewStateChange = props.onViewStateChange; | ||
} | ||
@@ -448,2 +440,4 @@ }, { | ||
value: function render() { | ||
this._setControllerProps(this.props); | ||
var _this$props4 = this.props, | ||
@@ -450,0 +444,0 @@ width = _this$props4.width, |
{ | ||
"name": "react-map-gl", | ||
"description": "A React wrapper for MapboxGL-js and overlay API.", | ||
"version": "5.0.9", | ||
"version": "5.0.10", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "mapbox", |
@@ -248,10 +248,2 @@ // @flow | ||
componentWillUpdate(nextProps: InteractiveMapProps, nextState: State) { | ||
this._setControllerProps(nextProps); | ||
if (nextState.isDragging !== this.state.isDragging) { | ||
this._updateInteractiveContext({isDragging: nextState.isDragging}); | ||
} | ||
} | ||
componentWillUnmount() { | ||
@@ -290,6 +282,7 @@ this._eventManager.destroy(); | ||
this._updateInteractiveContext({ | ||
onViewStateChange: props.onViewStateChange, | ||
onViewportChange: props.onViewportChange | ||
}); | ||
// Pass callbacks via MapContext | ||
// Do not create a new context object because these do not affect render | ||
const context = this._interactiveContext; | ||
context.onViewportChange = props.onViewportChange; | ||
context.onViewStateChange = props.onViewStateChange; | ||
} | ||
@@ -320,2 +313,3 @@ | ||
if (isDragging !== this.state.isDragging) { | ||
this._updateInteractiveContext({isDragging}); | ||
this.setState({isDragging}); | ||
@@ -501,2 +495,4 @@ } | ||
render() { | ||
this._setControllerProps(this.props); | ||
const {width, height, style, getCursor} = this.props; | ||
@@ -503,0 +499,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1344553
14647