Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
15 changes: 15 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends:
- eslint:recommended

plugins:
- prettier

env:
browser: true
es6: true

parserOptions:
sourceType: module

rules:
prettier/prettier: warn
54 changes: 0 additions & 54 deletions .jshintrc

This file was deleted.

2 changes: 2 additions & 0 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
printWidth: 100
singleQuote: true
139 changes: 71 additions & 68 deletions Control.Geocoder.css
Original file line number Diff line number Diff line change
@@ -1,123 +1,126 @@
.leaflet-control-geocoder {
border-radius: 4px;
background: white;
min-width: 26px;
min-height: 26px;
border-radius: 4px;
background: white;
min-width: 26px;
min-height: 26px;
}

.leaflet-touch .leaflet-control-geocoder {
min-width: 30px;
min-height: 30px;
min-width: 30px;
min-height: 30px;
}

.leaflet-control-geocoder a, .leaflet-control-geocoder .leaflet-control-geocoder-icon {
border-bottom: none;
display: inline-block;
.leaflet-control-geocoder a,
.leaflet-control-geocoder .leaflet-control-geocoder-icon {
border-bottom: none;
display: inline-block;
}

.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a {
width: inherit;
height: inherit;
line-height: inherit;
width: inherit;
height: inherit;
line-height: inherit;
}

.leaflet-control-geocoder a:hover, .leaflet-control-geocoder .leaflet-control-geocoder-icon:hover {
border-bottom: none;
display: inline-block;
.leaflet-control-geocoder a:hover,
.leaflet-control-geocoder .leaflet-control-geocoder-icon:hover {
border-bottom: none;
display: inline-block;
}

.leaflet-control-geocoder-form {
display: none;
vertical-align: middle;
display: none;
vertical-align: middle;
}
.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form {
display: inline-block;
display: inline-block;
}
.leaflet-control-geocoder-form input {
font-size: 120%;
border: 0;
background-color: transparent;
width: 246px;
font-size: 120%;
border: 0;
background-color: transparent;
width: 246px;
}

.leaflet-control-geocoder-icon {
border-radius: 4px;
width: 26px;
height: 26px;
border: none;
background-color: white;
background-image: url(images/geocoder.png);
background-repeat: no-repeat;
background-position: center;
cursor: pointer;
border-radius: 4px;
width: 26px;
height: 26px;
border: none;
background-color: white;
background-image: url(images/geocoder.png);
background-repeat: no-repeat;
background-position: center;
cursor: pointer;
}

.leaflet-touch .leaflet-control-geocoder-icon {
width: 30px;
height: 30px;
width: 30px;
height: 30px;
}

.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon {
background-image: url(images/throbber.gif);
background-image: url(images/throbber.gif);
}

.leaflet-control-geocoder-form-no-error {
display: none;
display: none;
}

.leaflet-control-geocoder-form input:focus {
outline: none;
outline: none;
}

.leaflet-control-geocoder-form button {
display: none;
display: none;
}
.leaflet-control-geocoder-error {
margin-top: 8px;
margin-left: 8px;
display: block;
color: #444;
margin-top: 8px;
margin-left: 8px;
display: block;
color: #444;
}
.leaflet-control-geocoder-alternatives {
display: block;
width: 272px;
list-style: none;
padding: 0;
margin: 0;
display: block;
width: 272px;
list-style: none;
padding: 0;
margin: 0;
}

.leaflet-control-geocoder-alternatives-minimized {
display: none;
height: 0;
display: none;
height: 0;
}
.leaflet-control-geocoder-alternatives li {
white-space: nowrap;
display: block;
overflow: hidden;
padding: 5px 8px;
text-overflow: ellipsis;
border-bottom: 1px solid #ccc;
cursor: pointer;
white-space: nowrap;
display: block;
overflow: hidden;
padding: 5px 8px;
text-overflow: ellipsis;
border-bottom: 1px solid #ccc;
cursor: pointer;
}

.leaflet-control-geocoder-alternatives li a, .leaflet-control-geocoder-alternatives li a:hover {
width: inherit;
height: inherit;
line-height: inherit;
background: inherit;
border-radius: inherit;
text-align: left;
.leaflet-control-geocoder-alternatives li a,
.leaflet-control-geocoder-alternatives li a:hover {
width: inherit;
height: inherit;
line-height: inherit;
background: inherit;
border-radius: inherit;
text-align: left;
}

.leaflet-control-geocoder-alternatives li:last-child {
border-bottom: none;
border-bottom: none;
}
.leaflet-control-geocoder-alternatives li:hover, .leaflet-control-geocoder-selected {
background-color: #f5f5f5;
.leaflet-control-geocoder-alternatives li:hover,
.leaflet-control-geocoder-selected {
background-color: #f5f5f5;
}
.leaflet-control-geocoder-address-detail {

}
.leaflet-control-geocoder-address-context {
color: #666;
}
color: #666;
}
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"build:js": "rollup --output.format=iife --name=L.Control.Geocoder --globals=leaflet:L src/index.js --output.file=dist/Control.Geocoder.js --sourcemap",
"build:css": "cpr Control.Geocoder.css dist/ --overwrite",
"build:img": "cpr images/ dist/images/ --overwrite",
"test": "npm run lint",
"lint": "npm run lint:js && npm run lint:css",
"lint:js": "eslint 'src/**'",
"lint:css": "prettier --list-different '*.css'",
"publish": "sh ./scripts/publish.sh",
"postpublish": "sh ./scripts/postpublish.sh"
},
Expand Down Expand Up @@ -38,6 +42,9 @@
"dependencies": {},
"devDependencies": {
"cpr": "^3.0.1",
"eslint": "^4.15.0",
"eslint-plugin-prettier": "^2.4.0",
"prettier": "^1.9.2",
"rollup": "^0.53.2"
}
}
Loading