Mercurial > gemma
diff client/src/layers/Identify.vue @ 941:8a80ef09a62c
client: improve identify
* Remove trigger that unfolds the box when features are identified.
Rationale: This makes the user interface too "jumpy".
* Instead add a style change for the icon to indicate if data is available.
It will use the bootstrap `text-info` style class.
* Simplify code that detects if a bottleneck was identified.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Tue, 09 Oct 2018 17:00:49 +0200 |
parents | 86278692c30c |
children | 7bf089e32b2d |
line wrap: on
line diff
--- a/client/src/layers/Identify.vue Tue Oct 09 13:30:45 2018 +0200 +++ b/client/src/layers/Identify.vue Tue Oct 09 17:00:49 2018 +0200 @@ -1,7 +1,7 @@ <template> <div class="identifymenu"> <div @click="collapse" class="d-flex flex-column ui-element minimizer"> - <div> + <div :class="infoStyle"> <i class="fa fa-info"></i> </div> </div> @@ -87,11 +87,6 @@ collapsed: true }; }, - watch: { - identifiedFeatures() { - this.collapsed = !this.identifiedFeatures; - } - }, computed: { ...mapState("mapstore", ["identifiedFeatures"]), identifyStyle() { @@ -103,6 +98,13 @@ identifyexpanded: !this.collapsed, identifycollapsed: this.collapsed }; + }, + infoStyle() { + return { + info: true, + "text-info": + this.identifiedFeatures && this.identifiedFeatures.length > 0 + }; } }, methods: {