Mercurial > gemma
view client/src/application/stores/application.js @ 860:38b682eaa7b1
client: add updateing of bottleneck filter
* Add a watcher on the selectedMorph to trigger the update of the bottleneck
filter.
* Reverse the parameter to updateBottleneckFilter() to the order that was
mostly used.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Fri, 28 Sep 2018 17:19:08 +0200 |
parents | 68a39aea942a |
children | 77202406b1a7 |
line wrap: on
line source
const defaultCollapseState = true; const initializeSplitScreen = () => { return { active: false, mode: "v" }; }; const DRAWMODES = { LINE: "LineString" }; const Application = { namespaced: true, state: { appTitle: process.env.VUE_APP_TITLE, secondaryLogo: process.env.VUE_APP_SECONDARY_LOGO_URL, sidebar: { iscollapsed: defaultCollapseState }, splitsceen: initializeSplitScreen(), usermenu: { iscollapsed: defaultCollapseState }, countries: ["AT", "SK", "HU", "HR", "RS", "BiH", "BG", "RO", "UA"], drawMode: null }, getters: { countries: state => { return state.countries; }, sidebarCollapsed: state => { return state.sidebar.iscollapsed; }, isUsermenuCollapsed: state => { return state.usermenu.iscollapsed; }, appTitle: state => { return state.appTitle; }, secondaryLogo: state => { return state.secondaryLogo; }, isSplitscreen: state => { return state.splitsceen.active; }, splitMode: state => { return state.splitsceen.mode; }, drawMode: state => { return state.drawMode; } }, mutations: { toggleSidebar: state => { state.sidebar.iscollapsed = !state.sidebar.iscollapsed; }, toggleUserMenu: state => { state.usermenu.iscollapsed = !state.usermenu.iscollapsed; }, toggleSplitScreen: state => { state.splitsceen.active = !state.splitsceen.active; }, openSplitScreen: state => { state.splitsceen.active = true; }, closeSplitScreen: state => { state.splitsceen.active = false; }, resetSidebar: state => { state.sidebar.iscollapsed = defaultCollapseState; }, collapseSidebar: state => { state.sidebar.iscollapsed = true; }, resetUserMenu: state => { state.usermenu.iscollapsed = defaultCollapseState; }, collapseUserMenu: state => { state.usermenu.iscollapsed = true; }, resetSplitScreen: state => { state.splitsceen = initializeSplitScreen(); }, toggleDrawModeLine: state => { if (state.drawMode && state.drawMode === DRAWMODES.LINE) { state.drawMode = null; return; } state.drawMode = DRAWMODES.LINE; } }, actions: {} }; export default Application;