Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
[Enhancement]: Save filter speed to schema (#1394)
Shan Hed295c7627332
diff --git a/src/schemas/schema-manager.d.ts b/src/schemas/schema-manager.d.tsindex 34bcabab7..e870350bd 100644--- a/src/schemas/schema-manager.d.ts+++ b/src/schemas/schema-manager.d.ts@@ -25,6 +25,8 @@ export type SavedFilter = {name: string;type: string;} | null;+ speed: Filter['speed'];+ layerId: Filter['layerId'];};export type ParsedFilter = Partial<SavedFilter>;diff --git a/src/schemas/vis-state-schema.js b/src/schemas/vis-state-schema.jsindex dcbb65013..bc37c0d4a 100644--- a/src/schemas/vis-state-schema.js+++ b/src/schemas/vis-state-schema.js@@ -656,7 +656,8 @@ export const filterPropsV1 = {}),// polygon filter properties- layerId: null+ layerId: null,+ speed: null};export const propertiesV0 = {diff --git a/test/fixtures/test-csv-data.js b/test/fixtures/test-csv-data.jsindex 0efc92afa..848e1be3d 100644--- a/test/fixtures/test-csv-data.js+++ b/test/fixtures/test-csv-data.js@@ -797,7 +797,7 @@ export const mergedTimeFilter = {fixedDomain: true,enlarged: true,isAnimating: false,- speed: 1,+ speed: 4,name: ['time'],type: 'timeRange',fieldIdx: [7],diff --git a/test/helpers/mock-state.js b/test/helpers/mock-state.jsindex 2d3e268fa..fdd5bae4c 100644--- a/test/helpers/mock-state.js+++ b/test/helpers/mock-state.js@@ -152,6 +152,12 @@ function mockStateWithFilters(state) {payload: [0, 'value', [1474606800000, 1474617600000]]},+ // set filter animation speed+ {+ action: VisStateActions.updateFilterAnimationSpeed,+ payload: [0, 4]+ },+// add another filter{action: VisStateActions.addFilter, payload: [testGeoJsonDataId]},diff --git a/test/node/schemas/vis-state-schema-test.js b/test/node/schemas/vis-state-schema-test.jsindex 7215e85ce..5b982fbbb 100644--- a/test/node/schemas/vis-state-schema-test.js+++ b/test/node/schemas/vis-state-schema-test.js@@ -101,7 +101,8 @@ test('#visStateSchema -> v1 -> save load filters', t => {enlarged: true,plotType: 'histogram',yAxis: null,- animationWindow: 'free'+ animationWindow: 'free',+ speed: 4},{dataId: [testGeoJsonDataId],@@ -112,7 +113,8 @@ test('#visStateSchema -> v1 -> save load filters', t => {enlarged: false,plotType: 'histogram',yAxis: null,- animationWindow: 'free'+ animationWindow: 'free',+ speed: 1}];