Mercurial > gemma
diff client/src/store/imports.js @ 2909:5105f6ad0176
client: stretches: fixed highlighting of selected stretch
The vectorloader for each layer can now take a callback to postprocess the returned features.
For the stretches layer the selectedStretch (which is now stored in the vuex store) now gets
a 'highlighted' flag. The layer respects that flag to alter the styles.
A watcher on selectedStretch resets the styles when selectedStretch changes and sets the highlighted
flag for the new selectedStretch, if present, otherwise the vectorloader does this job.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Tue, 02 Apr 2019 18:19:43 +0200 |
parents | c40540889b53 |
children | c8c7122047a2 |
line wrap: on
line diff
--- a/client/src/store/imports.js Tue Apr 02 17:08:07 2019 +0200 +++ b/client/src/store/imports.js Tue Apr 02 18:19:43 2019 +0200 @@ -32,6 +32,7 @@ declined: false, warning: false, stretches: [], + selectedStretch: null, imports: [], reviewed: [], show: null, @@ -128,6 +129,9 @@ setStretches: (state, stretches) => { state.stretches = stretches; }, + selectedStretch: (state, stretch) => { + state.selectedStretch = stretch; + }, setReviewed: (state, reviewed) => { state.reviewed = reviewed; },