forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[deck polygon] add support for geohash (apache#5712)
* [deck polygon] add support for geohash + improvements: * added autozoom support * support for metric & aggregations (only aggregates if metric is picked) * fixed stroke * fixed opacity * introduced a SliderControl * addressing comments, fixing build * Addressing comments (cherry picked from commit 60ecd72)
- Loading branch information
1 parent
18a37de
commit 88e1689
Showing
18 changed files
with
343 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.BootstrapSliderWrapper .slider-selection { | ||
background: #efefef; | ||
} | ||
|
||
.BootstrapSliderWrapper .slider-handle { | ||
background: #b3b3b3; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import ReactBootstrapSlider from 'react-bootstrap-slider'; | ||
import 'bootstrap-slider/dist/css/bootstrap-slider.min.css'; | ||
import './BootstrapSliderWrapper.css'; | ||
|
||
export default function BootstrapSliderWrapper(props) { | ||
return ( | ||
<span className="BootstrapSliderWrapper"> | ||
<ReactBootstrapSlider {...props} /> | ||
</span> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
superset/assets/src/explore/components/controls/SliderControl.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import BootstrapSliderWrapper from '../../../components/BootstrapSliderWrapper'; | ||
import ControlHeader from '../ControlHeader'; | ||
|
||
const propTypes = { | ||
onChange: PropTypes.func, | ||
value: PropTypes.oneOfType([ | ||
PropTypes.string, | ||
PropTypes.number, | ||
]), | ||
}; | ||
|
||
const defaultProps = { | ||
onChange: () => {}, | ||
}; | ||
|
||
export default function SliderControl(props) { | ||
// This wouldn't be necessary but might as well | ||
return ( | ||
<div> | ||
<ControlHeader {...props} /> | ||
<BootstrapSliderWrapper | ||
{...props} | ||
change={(obj) => { | ||
props.onChange(obj.target.value); | ||
}} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
SliderControl.propTypes = propTypes; | ||
SliderControl.defaultProps = defaultProps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.