Skip to content

Commit

Permalink
geophystech#352 Исправлен баг с прозрачными кружочками на главной.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arman committed May 9, 2019
1 parent c283f12 commit a13cbed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
8 changes: 6 additions & 2 deletions src/assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ details {
}

.circle-marker-map {
border: 1px solid #666;
border-radius: 50%;
> div {
border: 1px solid #222;
border-radius: 50%;
height: 100%;
width: 100%;
}
}
19 changes: 8 additions & 11 deletions src/map_functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,19 +636,16 @@ export function createMapEventMarker(event, $moment)
const options = {
fillColor: eventColor(datetimeDiff),
radius: eventRadius(magnitude),
numberOfSides: 360,
colorOpacity: 1.0,
fillOpacity: 0.8,
gradient: false,
color: 'black',
weight: 1
fillOpacity: 0.75
}

const coordinates = new window.L.LatLng(latitude, longitude)
const marker = new window.L.CircleMarker(coordinates, options)

/*options.icon = window.L.divIcon({className: 'circle-marker-map'})
const marker = window.L.marker(coordinates, options)*/
const marker = window.L.marker(new window.L.LatLng(latitude, longitude), {
icon: window.L.divIcon({
html: `<div style="background: ${colorHexToRGB(options.fillColor, options.fillOpacity)}"></div>`,
iconSize: eventRadius(magnitude) * 2.2,
className: 'circle-marker-map'
})
})

const popup =
`<table class="table table-hover table-sm table-responsive">
Expand Down

0 comments on commit a13cbed

Please sign in to comment.