You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ch...@apache.org on 2019/04/03 00:13:26 UTC

[incubator-superset] branch lyftga updated: fix: [lyftga] pass the latest deckgl props (#7208)

This is an automated email from the ASF dual-hosted git repository.

christine pushed a commit to branch lyftga
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/lyftga by this push:
     new 200efac  fix: [lyftga] pass the latest deckgl props (#7208)
200efac is described below

commit 200efacc3649d10a56ae14724d9b522a44839fe0
Author: Kim Truong <47...@users.noreply.github.com>
AuthorDate: Tue Apr 2 17:13:18 2019 -0700

    fix: [lyftga] pass the latest deckgl props (#7208)
---
 .../visualizations/deckgl/AnimatableDeckGLContainer.jsx   | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/superset/assets/src/visualizations/deckgl/AnimatableDeckGLContainer.jsx b/superset/assets/src/visualizations/deckgl/AnimatableDeckGLContainer.jsx
index f206522..fe2c716 100644
--- a/superset/assets/src/visualizations/deckgl/AnimatableDeckGLContainer.jsx
+++ b/superset/assets/src/visualizations/deckgl/AnimatableDeckGLContainer.jsx
@@ -34,6 +34,9 @@ const propTypes = {
   disabled: PropTypes.bool,
   viewport: PropTypes.object.isRequired,
   children: PropTypes.node,
+  mapStyle: PropTypes.string,
+  mapboxApiAccessToken: PropTypes.string.isRequired,
+  setControlValue: PropTypes.func,
   onViewportChange: PropTypes.func,
   onValuesChange: PropTypes.func,
 };
@@ -41,6 +44,8 @@ const propTypes = {
 const defaultProps = {
   aggregation: false,
   disabled: false,
+  mapStyle: 'light',
+  setControlValue: () => {},
   onViewportChange: () => {},
   onValuesChange: () => {},
 };
@@ -48,9 +53,6 @@ const defaultProps = {
 export default class AnimatableDeckGLContainer extends React.Component {
   constructor(props) {
     super(props);
-    const { getLayers, start, end, getStep, values, disabled, viewport, ...other } = props;
-    this.other = other;
-
     this.onViewportChange = this.onViewportChange.bind(this);
   }
   onViewportChange(viewport) {
@@ -71,6 +73,9 @@ export default class AnimatableDeckGLContainer extends React.Component {
       values,
       onValuesChange,
       viewport,
+      setControlValue,
+      mapStyle,
+      mapboxApiAccessToken,
     } = this.props;
     const layers = getLayers(values);
 
@@ -83,9 +88,11 @@ export default class AnimatableDeckGLContainer extends React.Component {
     return (
       <div>
         <DeckGLContainer
-          {...this.other}
           viewport={modifiedViewport}
           layers={layers}
+          setControlValue={setControlValue}
+          mapStyle={mapStyle}
+          mapboxApiAccessToken={mapboxApiAccessToken}
           onViewportChange={this.onViewportChange}
         />
         {!disabled &&