mcfxkh-Web/src/models/map/selectors.js

21 lines
770 B
JavaScript

import { createSelector } from "reselect";
import calcLayout from "./layout";
export const getView = s => s.map.view;
export const getSearch = s => s.map.search;
export const rightStack = s => s.map.rightStack;
export const hidePanels = s => s.map.hidePanels;
export const getLayout = createSelector(getView, rightStack, hidePanels, calcLayout);
export const getLayerVisible = s => s.map.layerVisible;
export const getLayerSetting = createSelector(
s => s.map.layerSetting,
s => s.runtime.layerSetting,
(s1, s2) => ({ ...s1, ...s2 })
);
export const getInfoDlg = s => s.runtime.infoDlg;
export const getCameraTarget = s => s.runtime.cameraTarget;
export const getFeatureTip = s => s.runtime.featureTip;
export const getFeaturePops = s => s.runtime.featurePops;