@carto/kepler.gl 0.0.37 → 0.0.40-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/index.js +17 -1
- package/dist/components/map-container.js +17 -3
- package/dist/components/side-panel/layer-panel/layer-configurator.js +9 -4
- package/dist/components/side-panel/layer-panel/layer-visibility-by-zoom.js +102 -0
- package/dist/constants/default-settings.js +8 -3
- package/dist/layers/base-layer.js +19 -6
- package/dist/layers/layer-factory.js +12 -1
- package/dist/localization/ca.js +4 -1
- package/dist/localization/cn.js +4 -1
- package/dist/localization/en.js +4 -1
- package/dist/localization/es.js +4 -1
- package/dist/localization/fi.js +4 -1
- package/dist/localization/ja.js +4 -1
- package/dist/localization/pt.js +4 -1
- package/dist/localization/ru.js +4 -1
- package/dist/reducers/vis-state-merger.js +4 -3
- package/dist/reducers/vis-state-updaters.js +29 -29
- package/dist/schemas/vis-state-schema.js +5 -1
- package/package.json +1 -1
- package/src/components/index.js +3 -1
- package/src/components/map-container.js +15 -1
- package/src/components/side-panel/layer-panel/layer-configurator.js +7 -3
- package/src/components/side-panel/layer-panel/layer-visibility-by-zoom.js +99 -0
- package/src/constants/default-settings.js +5 -0
- package/src/layers/base-layer.js +16 -4
- package/src/layers/index.d.ts +1 -0
- package/src/layers/layer-factory.js +9 -0
- package/src/localization/ca.js +3 -0
- package/src/localization/cn.js +3 -0
- package/src/localization/en.js +3 -0
- package/src/localization/es.js +3 -0
- package/src/localization/fi.js +3 -0
- package/src/localization/ja.js +3 -0
- package/src/localization/pt.js +3 -0
- package/src/localization/ru.js +3 -0
- package/src/reducers/vis-state-merger.js +5 -4
- package/src/reducers/vis-state-updaters.js +3 -1
- package/src/schemas/schema-manager.d.ts +1 -0
- package/src/schemas/vis-state-schema.js +2 -0
- package/umd/keplergl.min.js +31 -31
package/src/localization/ja.js
CHANGED
package/src/localization/pt.js
CHANGED
|
@@ -162,6 +162,9 @@ export default {
|
|
|
162
162
|
heightRange: 'Alcance da Altura',
|
|
163
163
|
heightMultiplier: 'Multiplicador de altura'
|
|
164
164
|
},
|
|
165
|
+
layerVisibility: {
|
|
166
|
+
title: 'Visibilidade por nível de zoom'
|
|
167
|
+
},
|
|
165
168
|
layerManager: {
|
|
166
169
|
addData: 'Adicionar Dados',
|
|
167
170
|
addLayer: 'Adicionar Camada',
|
package/src/localization/ru.js
CHANGED
|
@@ -164,6 +164,9 @@ export default {
|
|
|
164
164
|
heightRange: 'Диапазон высоты',
|
|
165
165
|
heightMultiplier: 'Множитель высоты'
|
|
166
166
|
},
|
|
167
|
+
layerVisibility: {
|
|
168
|
+
title: 'Видимость по уровню масштабирования'
|
|
169
|
+
},
|
|
167
170
|
layerManager: {
|
|
168
171
|
addData: 'Добавить данные',
|
|
169
172
|
addLayer: 'Добавить слой',
|
|
@@ -291,9 +291,9 @@ export function mergeInteractionTooltipConfig(state, tooltipConfig = {}) {
|
|
|
291
291
|
} else {
|
|
292
292
|
// if dataset is loaded
|
|
293
293
|
const allFields = state.datasets[dataId].fields.map(d => d.name);
|
|
294
|
-
const foundFieldsToShow =
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
const foundFieldsToShow = state.datasets[dataId].metadata.isDynamicSpatialIndex
|
|
295
|
+
? tooltipConfig.fieldsToShow[dataId]
|
|
296
|
+
: tooltipConfig.fieldsToShow[dataId].filter(field => allFields.includes(field.name));
|
|
297
297
|
|
|
298
298
|
mergedTooltip[dataId] = foundFieldsToShow;
|
|
299
299
|
}
|
|
@@ -491,7 +491,8 @@ export function validateLayerWithData(
|
|
|
491
491
|
color: savedLayer.config.color,
|
|
492
492
|
isVisible: savedLayer.config.isVisible,
|
|
493
493
|
hidden: savedLayer.config.hidden,
|
|
494
|
-
highlightColor: savedLayer.config.highlightColor
|
|
494
|
+
highlightColor: savedLayer.config.highlightColor,
|
|
495
|
+
visibilityByZoom: savedLayer.config.visibilityByZoom
|
|
495
496
|
});
|
|
496
497
|
|
|
497
498
|
// find column fieldIdx
|
|
@@ -1715,7 +1715,9 @@ export function addDefaultLayers(state, datasets) {
|
|
|
1715
1715
|
* @returns {Object} nextState
|
|
1716
1716
|
*/
|
|
1717
1717
|
export function addDefaultTooltips(state, dataset) {
|
|
1718
|
-
const tooltipFields =
|
|
1718
|
+
const tooltipFields = dataset.metadata.isDynamicSpatialIndex
|
|
1719
|
+
? {[dataset.id]: []}
|
|
1720
|
+
: findFieldsToShow(dataset);
|
|
1719
1721
|
const merged = {
|
|
1720
1722
|
...state.interactionConfig.tooltip.config.fieldsToShow,
|
|
1721
1723
|
...tooltipFields
|
|
@@ -70,6 +70,7 @@ export type SavedLayer = {
|
|
|
70
70
|
isVisible: boolean;
|
|
71
71
|
visConfig: object;
|
|
72
72
|
hidden: boolean;
|
|
73
|
+
visibilityByZoom: {min: number; max: number};
|
|
73
74
|
textLabel: Merge<LayerTextLabel, {field: {name: string; type: string} | null}>;
|
|
74
75
|
};
|
|
75
76
|
visualChannels: SavedVisualChannels;
|
|
@@ -235,6 +235,7 @@ export const layerPropsV0 = {
|
|
|
235
235
|
color: new LayerConfigSchemaV0({key: 'color'}),
|
|
236
236
|
isVisible: new LayerConfigSchemaV0({key: 'isVisible'}),
|
|
237
237
|
hidden: new LayerConfigSchemaV0({key: 'hidden'}),
|
|
238
|
+
visibilityByZoom: new LayerConfigSchemaV0({key: 'visibilityByZoom'}),
|
|
238
239
|
|
|
239
240
|
// convert visConfig
|
|
240
241
|
visConfig: new LayerVisConfigSchemaV0({key: 'visConfig'}),
|
|
@@ -451,6 +452,7 @@ export const layerPropsV1 = {
|
|
|
451
452
|
version: VERSIONS.v1
|
|
452
453
|
}),
|
|
453
454
|
hidden: null,
|
|
455
|
+
visibilityByZoom: null,
|
|
454
456
|
textLabel: new TextLabelSchemaV1({
|
|
455
457
|
version: VERSIONS.v1,
|
|
456
458
|
key: 'textLabel'
|