Skip to content

Commit

Permalink
Remove useless code and fix tests of map service
Browse files Browse the repository at this point in the history
  • Loading branch information
jajm committed Aug 20, 2021
1 parent 46b1759 commit f573b9a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 39 deletions.
37 changes: 0 additions & 37 deletions public/js/reports/map.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,6 @@
addMarkersToMap: addMarkersToMap,
};

const MapIcon = L.Icon.extend({
options: {
icon: 'home',
iconColor: 'black'
},

initialize: function (options) {
options = L.Util.setOptions(this, options);
},

createIcon: function () {
const div = document.createElement('div');
const options = this.options;

div.classList.add('leaflet-marker-icon');

if (options.icon) {
div.innerHTML = this._createInner();
}

return div;
},

_createInner: function () {
const options = this.options;

const iconClass = 'fa fa-' + options.icon;
const iconStyle = `style="color: ${options.iconColor}; font-size: 16px;"`;

return '<i ' + iconStyle + 'class="' + iconClass + '"></i>';
},

createShadow: function () {
return null;
}
});

return service;

function createMap (report, dataRows) {
Expand Down
2 changes: 0 additions & 2 deletions test/client/reports/map.service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ describe('map', function () {
beforeEach(angular.mock.module('app.layers'));

let map;
let L;

beforeEach(inject(function (_map_, _L_) {
map = _map_;
L = _L_;
}));

describe('getGroups', function () {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
require('../../../public/js/core/core.module.js');
require('../../../public/js/core/constants.js');
require('../../../public/js/core/connection.js');
require('../../../public/js/core/api.js');
require('../../../public/js/reports/reports.module.js');
require('../../../public/js/reports/reports.service.js');
require('../../../public/js/reports/report-column-settings-modal.component.js');
Expand Down

0 comments on commit f573b9a

Please sign in to comment.