From d7993a889961d7e8a15c14d9cd4a6064527404f3 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 28 May 2016 11:14:50 -0700 Subject: [PATCH] Add comment explaining weird map behavior --- src/components/entity/ha-entity-marker.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/entity/ha-entity-marker.js b/src/components/entity/ha-entity-marker.js index eac0d64ac4..b92c4e2161 100644 --- a/src/components/entity/ha-entity-marker.js +++ b/src/components/entity/ha-entity-marker.js @@ -2,6 +2,13 @@ import Polymer from '../../polymer'; require('../../components/ha-label-badge'); +/* +Leaflet clones this element before adding it to the map. This messes up +our Poylmer object and we lose the reference to the `hass` object. + +That's why we refer here to window.hass instead of the hass property. +*/ + export default new Polymer({ is: 'ha-entity-marker',