Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

fix(hex): restore control panel to functioning state #42

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,63 +17,64 @@
* under the License.
*/
import { sections } from '@superset-ui/chart-controls';
import { t, legacyValidateInteger, isFeatureEnabled, FeatureFlag } from '@superset-ui/core';
import { t } from '@superset-ui/core';
import { formatSelectOptions } from '../../utilities/utils';
import {
autozoom,
extruded,
filterNulls,
gridSize,
jsColumns,
jsDataMutator,
jsTooltip,
jsOnclickHref,
fillColorPicker,
strokeColorPicker,
filled,
stroked,
extruded,
viewport,
jsTooltip,
mapboxStyle,
geojsonColumn,
spatial,
viewport,
} from '../../utilities/Shared_DeckGL';
import { dndGeojsonColumn } from '../../utilities/sharedDndControls';

const geojson = isFeatureEnabled(FeatureFlag.ENABLE_EXPLORE_DRAG_AND_DROP)
? dndGeojsonColumn
: geojsonColumn;

export default {
controlPanelSections: [
sections.legacyRegularTime,
{
label: t('Query'),
expanded: true,
controlSetRows: [[geojson], ['row_limit'], [filterNulls], ['adhoc_filters']],
controlSetRows: [[spatial], ['size'], ['row_limit'], [filterNulls], ['adhoc_filters']],
},
{
label: t('Map'),
controlSetRows: [
[mapboxStyle, viewport],
// TODO [autozoom, null], // import { autozoom } from './Shared_DeckGL'
],
},
{
label: t('GeoJson Settings'),
controlSetRows: [
[fillColorPicker, strokeColorPicker],
[filled, stroked],
[extruded, null],
['color_picker'],
[autozoom],
Comment on lines -55 to +49
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to add the autozoom control as it appears to be used elsewhere, too. To make the behavior unchanged in the example chart, I'm adding autozoom: false to the chart metadata in the PR that bumps the version of this plugin on the main repo (forthcoming).

[gridSize],
[extruded],
[
{
name: 'point_radius_scale',
name: 'js_agg_function',
config: {
type: 'SelectControl',
freeForm: true,
label: t('Point Radius Scale'),
validators: [legacyValidateInteger],
default: null,
choices: formatSelectOptions([0, 100, 200, 300, 500]),
label: t('Dynamic Aggregation Function'),
description: t('The function to use when aggregating points into groups'),
default: 'sum',
clearable: false,
renderTrigger: true,
choices: formatSelectOptions([
'sum',
'min',
'max',
'mean',
'median',
'count',
'variance',
'deviation',
'p1',
'p5',
'p95',
'p99',
]),
},
},
null,
],
],
},
Expand Down