Skip to content
Open
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
16 changes: 8 additions & 8 deletions addon/helpers/div-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ import { helper } from '@ember/component/helper';
const isFastBoot = typeof FastBoot !== 'undefined';
/* global L */

export const divIcon = isFastBoot
? function () {}
: function divIcon(_, hash) {
// https://github.com/emberjs/ember.js/issues/14668
let options = Object.assign({}, hash);
return L.divIcon(options);
};

/**
* Represents a lightweight icon for markers that uses a simple `<div>` element instead of an image.
* Inherits from Icon but ignores the iconUrl and shadow options.
Expand All @@ -11,12 +19,4 @@ const isFastBoot = typeof FastBoot !== 'undefined';
* @param {Object} options the DivIcon options object
* @return {DivIcon}
*/
export const divIcon = isFastBoot
? function () {}
: function divIcon(_, hash) {
// https://github.com/emberjs/ember.js/issues/14668
let options = Object.assign({}, hash);
return L.divIcon(options);
};

export default helper(divIcon);