This commit is contained in:
Paulus Schoutsen 2017-02-13 23:34:43 -08:00
parent 267c0d51e1
commit e570c961e8
2 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@
"watch_ru_core": "rollup --config rollup/core.js --watch --sourcemap inline",
"watch_ru_demo": "rollup --config rollup/demo.js --watch --sourcemap inline",
"lint_js": "eslint src panels --ext html",
"lint_html": "ls -1 src/**/*.html panels/**/*.html | xargs polymer lint --input",
"lint_html": "ls -1 src/home-assistant.html panels/**/ha-panel-*.html | xargs polymer lint --input",
"test": "npm run lint_js && npm run lint_html"
},
"author": "Paulus Schoutsen <Paulus@PaulusSchoutsen.nl> (http://paulusschoutsen.nl)",

View File

@ -75,14 +75,14 @@ Polymer({
var bounds;
if (this._mapItems.length === 0) {
this._map.setView(new L.LatLng(this.hass.config.core.latitude,
this.hass.config.core.longitude), 14);
this._map.setView(
new window.L.LatLng(this.hass.config.core.latitude, this.hass.config.core.longitude),
14);
} else {
bounds = new window.L.latLngBounds(
this._mapItems.map(function (item) { return item.getLatLng(); }));
this._map.fitBounds(bounds.pad(0.5));
}
},
drawEntities: function (hass) {