mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
fixed clusterization
This commit is contained in:
parent
76d6cb3717
commit
50ab622b98
3 changed files with 4 additions and 7 deletions
|
@ -60,9 +60,6 @@ export class Sticker {
|
||||||
onMouseDown={this.onDelete}
|
onMouseDown={this.onDelete}
|
||||||
onTouchStart={this.onDelete}
|
onTouchStart={this.onDelete}
|
||||||
/>
|
/>
|
||||||
{
|
|
||||||
console.log('A?')
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</React.Fragment>,
|
</React.Fragment>,
|
||||||
this.element
|
this.element
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import L, { layerGroup } from 'leaflet';
|
import L, { layerGroup } from 'leaflet';
|
||||||
import { Sticker } from '$modules/Sticker';
|
import { Sticker } from '$modules/Sticker';
|
||||||
import 'leaflet.markercluster';
|
import 'leaflet.markercluster';
|
||||||
import icons from '$sprites/icon.svg';
|
|
||||||
import { clusterIcon } from '$utils/clusterIcon';
|
import { clusterIcon } from '$utils/clusterIcon';
|
||||||
|
|
||||||
export class Stickers {
|
export class Stickers {
|
||||||
|
@ -17,7 +16,7 @@ export class Stickers {
|
||||||
zoomToBoundsOnClick: true,
|
zoomToBoundsOnClick: true,
|
||||||
animate: false,
|
animate: false,
|
||||||
maxClusterRadius: 80,
|
maxClusterRadius: 80,
|
||||||
disableClusteringAtZoom: 15,
|
disableClusteringAtZoom: 13,
|
||||||
iconCreateFunction: clusterIcon,
|
iconCreateFunction: clusterIcon,
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
@ -74,6 +73,7 @@ export class Stickers {
|
||||||
dumpData = () => this.stickers.map(sticker => sticker.dumpData());
|
dumpData = () => this.stickers.map(sticker => sticker.dumpData());
|
||||||
|
|
||||||
onSpiderify = () => {
|
onSpiderify = () => {
|
||||||
|
// todo: it has markers passed as argument. Update only them.
|
||||||
if (this.editor.getEditing()) {
|
if (this.editor.getEditing()) {
|
||||||
this.startEditing();
|
this.startEditing();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
@red_primary: #ff7034;
|
@red_primary: #ff7034;
|
||||||
@red_secondary: #ff3344;
|
@red_secondary: #ff3344;
|
||||||
|
|
||||||
@panel_radius: 0;
|
@panel_radius: 2px;
|
||||||
@button_radius: 0;
|
@button_radius: 2px;
|
||||||
|
|
||||||
@color_primary: #4597d0;
|
@color_primary: #4597d0;
|
||||||
@color_success: #7cd766;
|
@color_success: #7cd766;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue