Skip to content

Commit

Permalink
Jsdoc seemed uphappy with me referencing objects that arn't included …
Browse files Browse the repository at this point in the history
…into the file (which seemed silly to import when not used outside of jsdoc) so just gone with objects for now.
  • Loading branch information
thybag committed Jun 19, 2024
1 parent df383cc commit ba41c47
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/util/setInitialView.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import L from 'leaflet';
import HaMapUtilities from "./HaMapUtilities.js";

/**
* Get latLng based on configuration
* - Return specific x/y if set
* - Return x/y of focused entity if provided
* - Return null (default behavior)
*
* @param {[type]} config [description]
* @return {[type]} [description]
* @param {object} config
* @param {object} hass
* @returns {[number, number]|null}
*/
function getConfiguredLatLong(config, hass) {

Expand All @@ -25,9 +26,9 @@ function getConfiguredLatLong(config, hass) {

/**
*
* @param string entityId
* @param {} hass
* @returns [number, number] latitude & longitude
* @param {string} entityId
* @param {object} hass
* @returns {[number, number]}
*/
function getFocusedEntityLatLng(entityId, hass) {
const entity = hass.states[entityId];
Expand All @@ -47,11 +48,11 @@ function getFocusedEntityLatLng(entityId, hass) {

/**
* setInitialView exported for use by Map component.
*
* @param L.Map map
* @param array entities
* @param MapConfig config
* @param {} hass
* @param {L.map} map
* @param {object} entities
* @param {object} config
* @param {object} hass
* @returns {void} void
*/
export default function setInitialView(map, entities, config, hass)
{
Expand Down

0 comments on commit ba41c47

Please sign in to comment.