Fix coding style

Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
This commit is contained in:
Yukai Huang 2019-09-29 09:28:11 +08:00
parent d857f0d12f
commit e3c460308c
No known key found for this signature in database
GPG Key ID: D4D3B2F0E99D4914
1 changed files with 2 additions and 3 deletions

View File

@ -459,7 +459,7 @@ export function finishView (view) {
const content = $value.text() const content = $value.text()
try { try {
let position, zoom let position, zoom
if (content.match(/^[\d\.\,\s]+$/)) { if (content.match(/^[\d.,\s]+$/)) {
const [lng, lat, zoo] = content.split(',').map(parseFloat) const [lng, lat, zoo] = content.split(',').map(parseFloat)
zoom = zoo zoom = zoo
position = [lat, lng] position = [lat, lng]
@ -474,7 +474,7 @@ export function finishView (view) {
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '<a href="https://www.openstreetmap.org/">OSM</a>', attribution: '<a href="https://www.openstreetmap.org/">OSM</a>',
maxZoom: 18, maxZoom: 18
}).addTo(map) }).addTo(map)
L.marker(position, { L.marker(position, {
icon: L.icon({ icon: L.icon({
@ -489,7 +489,6 @@ export function finishView (view) {
} }
}) })
// image href new window(emoji not included) // image href new window(emoji not included)
const images = view.find('img.raw[src]').removeClass('raw') const images = view.find('img.raw[src]').removeClass('raw')
images.each((key, value) => { images.each((key, value) => {