-
Notifications
You must be signed in to change notification settings - Fork 86
Permalink and state
Stéphane Brunner edited this page Nov 15, 2022
·
21 revisions
Interaction between the Login, the Permalink, and the Layertree throw the state.
graph TD;
PSO[(Original Permalink State)];
PS[(Permalink State)];
CS[(Layer Tree State)];
OC[Other Component]
subgraph Login
end
subgraph Permalink Component
URL
PC1[The UI - share];
PC2[Set to the URL];
end
subgraph Layer Tree
C1[Original permalink reader];
C2[Layer tree to permalink state converter];
C3[The UI];
C4[Search action to state converter];
end
subgraph Search
S1[UI]
end
URL-->PSO;
PS-->PC1;
PS-->PC2;
PSO-->C1;
C1-->CS;
CS-->C2;
C2-->PS;
OC-->CS;
CS<-->C3;
S1-. event with action .->C4
C4-->CS
In a simpler component than the layer tree, we will not have a dedicated RXJS state (just an internal state)
The permalink states will be a dictionary with str -> str.
The layertree state can be something like:
{
"root": {
"name": "<name of open theme>",
"children_ids": [...]
...
},
<id-calculated-by-ngeo>: <same as the theme>
}
Of hierarchic state?
We will probably also have:
- Something to store the result of the tree web service.
- Some event to communicate with the search, the filter, ...