Mercurial > gemma
annotate client/docs/developers.md @ 4777:702f06d827a8
Updated requested scale for legend elements to avoid duplicates.
author | Raimund Renkert <raimund@renkert.org> |
---|---|
date | Mon, 21 Oct 2019 13:33:15 +0200 |
parents | d6439e7c8b1c |
children |
rev | line source |
---|---|
4327
b372fbe15300
client: refactor dev documentation
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
1 When developing wamos, check out |
b372fbe15300
client: refactor dev documentation
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
2 |
b372fbe15300
client: refactor dev documentation
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
3 * [How translations are handled](dev-translations.md) |
b372fbe15300
client: refactor dev documentation
Bernhard Reiter <bernhard@intevation.de>
parents:
diff
changeset
|
4 * [Rationale of some choices](dev-generalconsiderations.md) |
4329
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
5 |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
6 ## Hints |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
7 |
4348
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
8 ### svg2pdf |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
9 |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
10 https://github.com/yWorks/svg2pdf.js has known shortcomings, |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
11 which we work around. |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
12 |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
13 Not all layout possibilities of webbrowser are not supported! |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
14 |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
15 Our tactics is to report the problems, but work around them, if we can, |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
16 some examples: |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
17 |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
18 * https://github.com/yWorks/svg2pdf.js/issues/82 (Unsupported features/Known issues) |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
19 * https://github.com/yWorks/svg2pdf.js/issues/109 (alignment-baseline attribute does not work) |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
20 * https://github.com/yWorks/svg2pdf.js/issues/100 (Font-size in `em` unit does not work) |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
21 |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
22 |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
23 ### Testing diagram layout and pdf export |
dc5a10542e16
client, docs: add hints about svg2pdf shortcomings
Bernhard Reiter <bernhard@intevation.de>
parents:
4334
diff
changeset
|
24 |
4329
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
25 When testing the vuex store object can be accessed from the |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
26 webbrowsers console like |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
27 |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
28 ```javascript |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
29 store = document.getElementsByTagName('a')[0].__vue__.$store |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
30 ``` |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
31 |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
32 This allows for setting test values where getting real test data |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
33 is complicated. For example testing the diagramm for the |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
34 fairwayavailability (tested with Chromium 73 und gemma-2019-09-04): |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
35 |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
36 ```javascript |
4352
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
37 data = store.state.fairwayavailability.csv // see current data |
4329
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
38 |
4363
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
39 data=`#time,# < LDC (164.0) [d],# >= LDC (164.0) [d],# < 230.0 [d],# >= 230.0 [d],# >= 250.0 [d] |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
40 01-2019, 0,31, 0, 0,31 |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
41 02-2019,14,14, 6, 8,14 |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
42 03-2019, 1,30, 3, 2, 2 |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
43 04-2019, 5,25, 1, 1,28 |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
44 05-2019, 6,25, 3, 2, 3 |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
45 06-2019, 0, 0, 0, 0, 0 |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
46 07-2019, 0,16, 0, 0, 0 |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
47 08-2019, 0, 0,31, 0, 0 |
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
48 09-2019, 0, 9, 0, 3, 9 |
4329
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
49 ` |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
50 |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
51 store.commit("fairwayavailability/setAvailableFairwayDepthData", data) |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
52 ``` |
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
53 |
4352
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
54 Or for the AvailableFairwayDepthLNWLDiagram: |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
55 ```javascript |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
56 data = store.state.fairwayavailability.csv // see current data |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
57 |
4363
d6439e7c8b1c
client, docs: adjust example for testing diagram
Bernhard Reiter <bernhard@intevation.de>
parents:
4352
diff
changeset
|
58 data=`#time,# < LDC (162.0) [h],# >= LDC (162.0) [h],#d < 230.0 [%],#d >= 230.0 [%],#d >= 250.0 [%] |
4352
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
59 09-2018,100, 0,100 , 0, 0 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
60 10-2018,100, 0, 80 , 20, 0 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
61 11-2018,100, 0, 0 , 100, 0 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
62 12-2018, 80, 20, 50 , 50, 0 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
63 01-2019, 70, 30, 15 , 60, 25 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
64 02-2019, 65, 35, 40 , 40, 20 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
65 03-2019, 55, 45, 42 , 42, 16 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
66 04-2019, 42, 58, 40 , 20 , 40 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
67 05-2019, 30, 70, 2 , 30 , 68 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
68 06-2019, 30, 70, 0 , 25 , 75 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
69 07-2019, 20, 80, 25 , 0 , 75 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
70 08-2019, 0,100, 10.1, 1.5, 88.4 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
71 09-2019, 0,100, 23.5, 2.4, 74.1 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
72 ` |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
73 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
74 store.commit("fairwayavailability/setAvailableFairwayDepthLNWLData", data) |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
75 ``` |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
76 |
6365466ead83
client, docs: add example for diagram testing
Bernhard Reiter <bernhard@intevation.de>
parents:
4348
diff
changeset
|
77 |
4329
83eb99662a91
client: improve ability to test FW diagrams
Bernhard Reiter <bernhard@intevation.de>
parents:
4327
diff
changeset
|
78 (Depends on the code structure in store/fairwayavailability.js.) |