Conversation
6ea6620 to
9851c3b
Compare
|
For the sync the sliding of the slider works, but if instead of the sliding the slider, you click on the timeline, the slider move but the time selector button rest unchanged to the old value. |
|
As discussed with @pakb the time slider is a pre-visualization tool, which means that closing it revert to the previous state and that the year selected from the slider is not synced with the layer year button and layer year in url. |
|
The cursor on the slider should changed to |
ltshb
left a comment
There was a problem hiding this comment.
Code part looks good, just the two issues during manual tests.
4da5159 to
d60321e
Compare
|
I have renamed the class that contains information about timestamp and year, as I found it confusing that we had to write |
d60321e to
896c060
Compare
ltshb
left a comment
There was a problem hiding this comment.
Still some issues with the grab and grabbing cursor
874329f to
8a164f7
Compare
10483c3 to
e49f68e
Compare
8a164f7 to
aa6a9a8
Compare
And replace the enum declaration by exporting each coordinate system separately (plus all possible systems in an array) This should enable us to check the type of a projection/coordinate system when we receive them through a Vue prop (it wasn't possible to type check with the enum declaration, it's now the case as it is declared as a class)
As there are some layers that uses the first day of the year to describe the full year, and others the last day of the year, I thought it would be easier to switch to a "only-year" notation. This also prepare the grounds for a complete switch to a more OGC compliant approach, with ISO 8601 timestamps (and ranges). Meaning when we only give a year as YYYY, we want all the data from this year (from YYYY-01-01 to YYYY-12-31)
As with a preview layer, this year takes precedence over any other configuration in layers. This will help when we will want to add a time slider, as we don't want the time slider to alter all active layers config, but only "preview" the year that was chosen through the time slider. This means that all URL generation for layers now have to take into account that, if a preview year is defined, they have to replace any timestamp found in the layer's config with the timestamp corresponding to the preview year. I've also simplified some props/data transfers between the OpenLayersInternalLayers and all specialized layers.
so that we have one less warning in the JS console, as it was a bad practice to actively listen to mouse events (creates lag on user inputs)
As it is now only storing the year part of the timestamp. Also double proofing the selected timestamp in WMS and WMTS layer URL definition, with fallback to the timestamp defined in the time config if the one given as preview year is invalid in the context of the layer
Otherwise the UI will still show the preview year in the menu, while the user has chosen to change the layer config. This is about the same behavior as mf-geoadmin3, going a little further by hiding the time slider if this happens (somehow the time slider was kept in mf-geoadmin3, even though it doesn't make much sense as years are now mixed up and do not follow what is selected with the time slider anymore)
As the store was not dispatched anytime the preview year of the time slider is changed (at startup we do not want a dispatch). So I've moved all set + dispatch into a single method that is also called when a click occurs on a year (watching the prop wasn't an option for the reason stated above, at startup we want to set it up without dispatching the store)
As it was confusing to show the change of preview year here, but then not highlighting the previewed year if the year selector popup was opened. And as we want the time slider to be a "preview only" feature, it wasn't making much sense to change the year shown in the menu, as the year in the URL wasn't affected by the year selected through the time slider.
some occurrences of the old "series" name were left unchanged
storing the timestamp "as is" simplifies this logic significantly (no need for this getter and enum anymore)
As it was confusing to have to write timestamp.timestamp, so I've opted for a timeEntry name that contains the year and equivalent timestamp. In the process, I've tried to simplified the case of no time entry for a WMTS layer, and replaced all the "magic numbers" (9999, 'all', 'current') with constants that are imported when needed. I also fixed an issue when the time slider was dealing with a WMTS layer that had a 'current' timestamp available (as it is a different value than the 'all' from WMS it was required to manage this case too)
It was shown below the header bar when the layer from which it comes was sufficiently high in the menu tray, hiding the couple first row of possible year to choose
Cursor state is changed according to the user action or mouse position : - pointer on the year line (as it can be clicked through here) - grabbing hand over the grabbing part of the year selector - the hands change shape to the grabbed position when we click on the grabbing handles
so that when the user drags the year cursor (and his pointer is out of the year cursor) there is consistency with cursor type (it stays grabbing)
aa6a9a8 to
40d1265
Compare
hansmannj
left a comment
There was a problem hiding this comment.
Thanks a lot and sorry that I did not really have too much time for reviewing this!
👍



Test link