Mercurial > gemma
annotate client/src/components/paneSetups.js @ 3678:8f58851927c0
client: make layer factory only return new layer config for individual maps
instead of each time it is invoked. The purpose of the factory was to support multiple maps with individual layers.
But returning a new config each time it is invoked leads to bugs that rely on the layer's state. Now this factory
reuses the same objects it created before, per map.
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Mon, 17 Jun 2019 17:31:35 +0200 |
parents | fa7dc3f31ef3 |
children |
rev | line source |
---|---|
3146
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
1 const main = { id: "main", component: "Map" }; |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
2 |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
3 export const DEFAULT = { main }; |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
4 export const COMPARESURVEYS = { |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
5 main, |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
6 compare: { id: "compare-survey", component: "Map" } |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
7 }; |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
8 export const FAIRWAYPROFILE = { |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
9 main, |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
10 fairwayprofile: { id: "fairwayprofile", component: "Fairwayprofile" } |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
11 }; |
3178
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
12 |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
13 export const AVAILABLEFAIRWAYDEPTH = { |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
14 main, |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
15 availablefairwaydepth: { |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
16 id: "availablefairwaydepth", |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
17 component: "AvailableFairwayDepth" |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
18 } |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
19 }; |
5ec34e08b01d
available_fairway_depth: display mock
Thomas Junk <thomas.junk@intevation.de>
parents:
3146
diff
changeset
|
20 |
3296
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
21 export const AVAILABLEFAIRWAYDEPTHLNWL = { |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
22 main, |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
23 availablefairwaydepth: { |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
24 id: "availablefairwaydepthlnwl", |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
25 component: "AvailableFairwayDepthLNWL" |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
26 } |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
27 }; |
fa7dc3f31ef3
available_fairwaydepth_vs_lnwl: POC etd.
Thomas Junk <thomas.junk@intevation.de>
parents:
3178
diff
changeset
|
28 |
3146
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
29 export const COMPARESURVEYS_FAIRWAYPROFILE = { |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
30 main, |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
31 compare: { id: "compare-survey", component: "Map" }, |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
32 fairwayprofile: { id: "fairwayprofile", component: "Fairwayprofile" } |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
33 }; |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
34 export const GAUGE_WATERLEVEL = { |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
35 main, |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
36 waterlevel: { id: "gauge-waterlevel", component: "Waterlevel" } |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
37 }; |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
38 export const GAUGE_HYDROLOGICALCONDITIONS = { |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
39 main, |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
40 hydrological: { |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
41 id: "gauge-hydrologicalconditions", |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
42 component: "HydrologicalConditions" |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
43 } |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
44 }; |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
45 export const GAUGE_WATERLEVEL_HYDROLOGICALCONDITIONS = { |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
46 main, |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
47 waterlevel: { id: "gauge-waterlevel", component: "Waterlevel" }, |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
48 hydrological: { |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
49 id: "gauge-hydrologicalconditions", |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
50 component: "HydrologicalConditions" |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
51 } |
b6cc4838d2c0
client: implemented pane mechanic for diagrams
Markus Kottlaender <markus@intevation.de>
parents:
diff
changeset
|
52 }; |