mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-12 20:02:28 +08:00
feat(geomap): add shadow to marker
This commit is contained in:
parent
1be3492f67
commit
08722d5935
@ -33,6 +33,13 @@ const TPL = `\
|
|||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.geo-map-container .leaflet-div-icon .icon-shadow {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
.geo-map-container .leaflet-div-icon span {
|
.geo-map-container .leaflet-div-icon span {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 3px;
|
top: 3px;
|
||||||
@ -153,7 +160,8 @@ export default class GeoMapTypeWidget extends TypeWidget {
|
|||||||
const [ lat, lng ] = latLng.split(",", 2).map((el) => parseFloat(el));
|
const [ lat, lng ] = latLng.split(",", 2).map((el) => parseFloat(el));
|
||||||
const icon = L.divIcon({
|
const icon = L.divIcon({
|
||||||
html: `\
|
html: `\
|
||||||
<img src="${asset_path}/node_modules/leaflet/dist/images/marker-icon.png" />
|
<img class="icon" src="${asset_path}/node_modules/leaflet/dist/images/marker-icon.png" />
|
||||||
|
<img class="icon-shadow" src="${asset_path}/node_modules/leaflet/dist/images/marker-shadow.png" />
|
||||||
<span class="bx ${childNote.getIcon()}"></span>
|
<span class="bx ${childNote.getIcon()}"></span>
|
||||||
`,
|
`,
|
||||||
iconSize: [ 25, 41 ],
|
iconSize: [ 25, 41 ],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user