mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
fixed map clicks on sticker drag
This commit is contained in:
parent
67eeaa7293
commit
7bdf07cae5
7 changed files with 150 additions and 141 deletions
18
src/constants/map.ts
Normal file
18
src/constants/map.ts
Normal file
|
@ -0,0 +1,18 @@
|
|||
import { Map } from 'leaflet';
|
||||
|
||||
export class MapContainer extends Map {
|
||||
disableClicks = () => {
|
||||
this.clickable = false;
|
||||
};
|
||||
|
||||
enableClicks = () => {
|
||||
this.clickable = true;
|
||||
};
|
||||
|
||||
public clickable = true;
|
||||
}
|
||||
|
||||
export const MainMap = new MapContainer(document.getElementById('canvas')).setView(
|
||||
[55.0153275, 82.9071235],
|
||||
13
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue