Fix some bugs
This commit is contained in:
parent
42cf50ee75
commit
f62854ebaa
@ -70,6 +70,10 @@ export const Geoman = ({ user, userPos, joinRoom }) => {
|
|||||||
dontRedirect = false;
|
dontRedirect = false;
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
|
marker.bindPopup(chatRoom.name || `Chat Room ${chatRoom.id}`);
|
||||||
|
marker.on('mouseover', (e) => {
|
||||||
|
e.target.openPopup();
|
||||||
|
});
|
||||||
if (chatRoom.isEditable) {
|
if (chatRoom.isEditable) {
|
||||||
[circle, marker].map((x) => {
|
[circle, marker].map((x) => {
|
||||||
x.on('pm:edit', (e) => {
|
x.on('pm:edit', (e) => {
|
||||||
@ -78,6 +82,7 @@ export const Geoman = ({ user, userPos, joinRoom }) => {
|
|||||||
circle.setLatLng(coords);
|
circle.setLatLng(coords);
|
||||||
api.put(`/chat_rooms/${chatRoom.id}`, {
|
api.put(`/chat_rooms/${chatRoom.id}`, {
|
||||||
...chatRoom,
|
...chatRoom,
|
||||||
|
radius: circle.getRadius(),
|
||||||
latitude: coords.lat,
|
latitude: coords.lat,
|
||||||
longitude: coords.lng,
|
longitude: coords.lng,
|
||||||
});
|
});
|
||||||
@ -93,11 +98,6 @@ export const Geoman = ({ user, userPos, joinRoom }) => {
|
|||||||
circle.on('pm:drag', (e) => {
|
circle.on('pm:drag', (e) => {
|
||||||
marker.setLatLng(e.target.getLatLng());
|
marker.setLatLng(e.target.getLatLng());
|
||||||
});
|
});
|
||||||
marker.bindPopup(chatRoom.name || `Chat Room ${chatRoom.id}`);
|
|
||||||
marker.on('mouseover', (e) => {
|
|
||||||
console.log(chatRoom);
|
|
||||||
e.target.openPopup();
|
|
||||||
});
|
|
||||||
marker.on('pm:drag', (e) => {
|
marker.on('pm:drag', (e) => {
|
||||||
circle.setLatLng(e.target.getLatLng());
|
circle.setLatLng(e.target.getLatLng());
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user