Skip to content

Commit

Permalink
Format files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jedgar1mx committed Feb 6, 2024
1 parent 65b1860 commit 9b531ba
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
11 changes: 6 additions & 5 deletions src/components/organisms/Map/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class Map extends HTMLElement {
}

const mapData = JSON.parse(this.getAttribute('data-map-data'));
if(mapData){
if (mapData) {
this.map.addSource('data-points', {
type: 'geojson',
data: mapData.data,
Expand All @@ -101,7 +101,6 @@ export default class Map extends HTMLElement {
},
});
}

});
// Creating this temp variable for workaround with dealing with "this" encapsulation
// TODO: See CityOfDetroit/detroitmi#1099
Expand All @@ -127,11 +126,13 @@ export default class Map extends HTMLElement {
const mapMode = this.getAttribute('data-map-mode');
switch (mapMode) {
case 'my-home-info': {
const parentComponentName = this.getAttribute('data-parent-component');
const parentComponentName = this.getAttribute(
'data-parent-component',
);
const app = document.getElementsByTagName(parentComponentName);
const closeMapBtn = document.createElement('cod-button');
closeMapBtn.addEventListener('click', () => {
(app[0]) ? app[0].setAttribute('data-app-state', 'results') : 0;
app[0] ? app[0].setAttribute('data-app-state', 'results') : 0;
});
closeMapBtn.setAttribute('data-primary', true);
closeMapBtn.setAttribute('data-label', 'x');
Expand All @@ -143,7 +144,7 @@ export default class Map extends HTMLElement {
closeMapBtn.setAttribute('data-icon', '');
closeMapBtn.setAttribute('data-shape', 'square');
this.mapWrapper.appendChild(closeMapBtn);
(app[0]) ? app[0].setAttribute('data-map-state', 'init') : 0;
app[0] ? app[0].setAttribute('data-map-state', 'init') : 0;
break;
}

Expand Down
Loading

0 comments on commit 9b531ba

Please sign in to comment.