@@ -71,7 +71,6 @@ export type UrlStore = {
7171 addDashboardGroup ( groupKey : GroupKey ) : void ;
7272 removeDashboardGroup ( groupKey : GroupKey ) : void ;
7373 setDashboardGroup ( groupKey : GroupKey , next : ProduceUpdate < GroupInfo > ) : void ;
74- // moveDashboardPlot(index: PlotKey | null, indexTarget: PlotKey | null, indexGroup: GroupKey | null): void;
7574 setNextDashboardSchemePlot ( nextScheme : { groupKey : GroupKey ; plots : PlotKey [ ] } [ ] ) : void ;
7675 autoSearchVariable ( ) : Promise < Pick < QueryParams , 'variables' | 'orderVariables' > > ;
7776 saveDashboard ( ) : Promise < void > ;
@@ -276,42 +275,6 @@ export const urlStore: StoreSlice<StatsHouseStore, UrlStore> = (setState, getSta
276275 setDashboardGroup ( groupKey , next ) {
277276 setUrlStore ( updateGroup ( groupKey , next ) ) ;
278277 } ,
279- // moveDashboardPlot(plotKey, plotKeyTarget, groupKey) {
280- // if (plotKey != null && groupKey != null) {
281- // setUrlStore(
282- // updateParamsPlotStruct((plotStruct) => {
283- // const sourceGroupKey = plotStruct.mapPlotToGroup[plotKey] ?? '';
284- // const sourceGroupIndex = plotStruct.mapGroupIndex[sourceGroupKey];
285- // const sourcePlotIndex = plotStruct.mapPlotIndex[plotKey];
286- // const targetGroupIndex = plotStruct.mapGroupIndex[groupKey ?? sourceGroupKey];
287- // let targetPlotIndex = plotStruct.mapPlotIndex[plotKeyTarget ?? plotKey];
288- // if (sourceGroupIndex != null && sourcePlotIndex != null) {
289- // const sourcePlots = plotStruct.groups[sourceGroupIndex].plots.splice(sourcePlotIndex, 1);
290- // if (targetGroupIndex == null) {
291- // plotStruct.groups.push({
292- // plots: [...sourcePlots],
293- // groupInfo: {
294- // ...getNewGroup(),
295- // id: groupKey,
296- // },
297- // });
298- // } else {
299- // if (targetPlotIndex) {
300- // if (sourceGroupIndex === targetGroupIndex) {
301- // targetPlotIndex = plotStruct.groups[targetGroupIndex].plots.findIndex(
302- // ({ plotInfo }) => plotInfo.id === plotKeyTarget
303- // );
304- // }
305- // plotStruct.groups[targetGroupIndex].plots.splice(targetPlotIndex, 0, ...sourcePlots);
306- // } else {
307- // plotStruct.groups[targetGroupIndex].plots.push(...sourcePlots);
308- // }
309- // }
310- // }
311- // })
312- // );
313- // }
314- // },
315278 setNextDashboardSchemePlot ( nextScheme ) {
316279 setUrlStore (
317280 updateParamsPlotStruct ( ( plotStruct ) => {
@@ -358,6 +321,7 @@ export const urlStore: StoreSlice<StatsHouseStore, UrlStore> = (setState, getSta
358321 setUrlStore ( ( store ) => {
359322 store . saveParams = saveParams ;
360323 store . params . dashboardVersion = saveParams . dashboardVersion ;
324+ store . params . dashboardId = saveParams . dashboardId ;
361325 } ) ;
362326 }
363327 } ,
0 commit comments