Skip to content

Fix #3373. Support for disable playback buttons#3377

Merged
offtherailz merged 1 commit intogeosolutions-it:c127_geonode_integrationfrom
offtherailz:fix_#3373
Nov 30, 2018
Merged

Fix #3373. Support for disable playback buttons#3377
offtherailz merged 1 commit intogeosolutions-it:c127_geonode_integrationfrom
offtherailz:fix_#3373

Conversation

@offtherailz
Copy link
Copy Markdown
Member

Description

This changes improve the timeline to disable previous-next buttons when there is no previous or next step. This happens only when a guide layer is selected.

Issues

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Feature

What is the current behavior? (You can also link to an open issue here)
The buttons are always enabled

What is the new behavior?
The buttons are disabled when the next/previous step is not present (the user is on the first/last time of the current data (limited by playback-range, if enabled)
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No

Other information:
When animation is active, the next and previous values are from the animation frames array, that is downloaded is chunks.
When instead the user instead uses the timeline manually (not animating), next and previous values have to be reloaded on every time selection to enable/disable the buttons accordingly.

So when a user clicks, we will have 4 requests.

  • 2 for snap (in timeline)
  • 2 to get the next/previous values (in playback)

note: We can not expand and reuse snap request because fromValue is excluded from the response of the server, but it may be a valid value. So after snapping, you have to get the effective next and previous value of the current element anyway. The only thing we could optimize is to reduce the number of requests to 1, with a specific service.

Some notes about possible optimization using new services

Actually double getDomainValues for 2 different purposes:

  • Get nearest value (for snapping). This could optimized getting only nearest value, in whatever direction it is.
  • Get next previous values (for playback buttons enable/disable). This can be reduced to one request, but even in this case, it is very specific. GeoServer should implement a service that get the Domain neighbourhood of max X elements for each side.

Both services are very application-specific. Lets evaluate if they are really needed.

@ghost ghost assigned offtherailz Nov 29, 2018
@offtherailz offtherailz added this to the 2019.01.00 milestone Nov 29, 2018
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 80.604% when pulling 2d430bb on offtherailz:fix_#3373 into 0b16bc2 on geosolutions-it:c127_geonode_integration.

@offtherailz offtherailz merged commit a2f9d69 into geosolutions-it:c127_geonode_integration Nov 30, 2018
@offtherailz offtherailz deleted the fix_#3373 branch February 18, 2020 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants