Synced objects now expose different methods, such as:
- `getSyncEngine` which returns the location of the sync object.
- `getMetadata` which returns the associated metadata with the object.
Hooks have been added when features are created or changed, so the
changes can be synced with other peers.
Authentication is now done using a signed token provided by the Django
server, sent by the JS client and checked by the WebSocket server.
The token contains a `permissions` key that's checked to ensure the user
has access to the map "room", where events will be shared by the peers.
A new SyncEngine module has been added to the JavaScript code. It aims
to sync the local changes with remote ones. This first implementation
relies on a websocket connection.
There is one "room" per map, and the server relays messages to all the
other connected peers.
Messages are checked for compliance with what's allowed as a security
measure. They should also be checked in the clients to avoid potential
attack vectors.
Basically, we do not add `<br>` anymore, but instead let the newline
and use the css `white-space: pre-line;`. Also remove new lines after
title.
While doing that change, I needed to reorder regex so the ones needing
a newline before would still have it (bullets points).
I've added tests and removed some to cover those changes.
fix#1854
cf https://forum.openstreetmap.fr/t/umap-2-3-changement-de-gestion-des-pop-up/23680/3
Trying to make this panel expanded/condenses thing simpler and more intuitive.
It's mode can be set:
- by explicitely setting defaultPanelMode = xxx
- or, if defaultPanelMode is undefined, with sensible default when there is
an onLoadPanel defined, and to respect previous uMap behaviour
- or, if defaultPanelMode is unset, and some feature opens in the panel, it
will be set to expanded (here again to respect previous behaviour
- then, when user change it manually (by clicking on the toggle button), then
we should never change it automatically, and respect the previous mode when
reopening the panel
(We are only talking about the left panel, here.)