aboutsummaryrefslogtreecommitdiffstats
path: root/docs/_posts
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-04-08 16:37:09 +0100
committerMatthew Somerville <matthew@mysociety.org>2020-04-08 23:38:47 +0100
commit1fa87a4adb61c3131516e711f3cf3a83941495d5 (patch)
treefcbf4b8eb1fe8cea0465dcfe0f4181ba08dd80cd /docs/_posts
parent75002bb7f3eb82fa1c8002e199e188501d7954a4 (diff)
[UK] Fix Highways England categories on pin move.
If you clicked on a non-HE location (so showing non-HE categories), then moved the pin to a HE location, the HE message box would show and update categories (but there would be no HE ones at the time). The server would return the new categories (including HE ones), but as the issue location had now not changed on this second call, the categories would not update to hide non-HE ones (it would show both HE and non-HE categories). So, instead of going off a location, check the road name - if it has not changed, do not recreate the whole HE message box, but do call the right HE selected/not selected function to update the categories. Note that this, if "Somewhere else" is selected, then causes an infinite loop, because the highways_change event triggers a category_change event which fires the layer's road found function, and then repeat. The highways_change->category_change event firing, according to the code comment, is so that asset selection can take place, or to remove stopper messages being shown. Previously, HE did not have its own categories but overrode the body to be sent to; HE now does have categories of its own, so I think this code can be removed.
Diffstat (limited to 'docs/_posts')
0 files changed, 0 insertions, 0 deletions