diff options
author | Dave Arter <davea@mysociety.org> | 2018-02-23 13:14:09 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2018-03-14 13:32:37 +0000 |
commit | e94a252f5c15dbc217d67b998f1d29670205ad08 (patch) | |
tree | 372a72770428f89dc14f8cdd8fe3f41e1cf1d37c /t/app/controller/dashboard.t | |
parent | 862e13723b78471bad6172c4debde69d0b85b91a (diff) |
Fix broken map when logging to /report/new with active asset layers
The event handlers for category changing were being added too early,
before fixmystreet.map had been created. For cobrands with category
grouping enabled this was causing a crash in the JS because the grouping
code emits a category change event during its setup (which runs between
fixmystreet.assets.add and .assets.init).
This commit adds the event handlers for each layer during
fixmystreet.assets.init - at point at which fixmystreet.map has been set
up. Also extracts the code for initing each layer into its own function
for clarity.
Diffstat (limited to 't/app/controller/dashboard.t')
0 files changed, 0 insertions, 0 deletions