Simon Hunt
Committed by Gerrit Code Review

GUI : Icon Service -- added registerIconMapping() call.

Change-Id: I8a4d94b19240385140e2f0e115fbaa9fb24ec5c5
...@@ -222,6 +222,13 @@ ...@@ -222,6 +222,13 @@
222 }; 222 };
223 } 223 }
224 224
225 + function registerIconMapping(iconId, glyphId) {
226 + if (glyphMapping[iconId]) {
227 + $log.warn('Icon with id', iconId, 'already mapped. Ignoring.');
228 + } else {
229 + glyphMapping[iconId] = glyphId;
230 + }
231 + }
225 232
226 // ========================= 233 // =========================
227 // === DEFINE THE MODULE 234 // === DEFINE THE MODULE
...@@ -256,7 +263,8 @@ ...@@ -256,7 +263,8 @@
256 addDeviceIcon: addDeviceIcon, 263 addDeviceIcon: addDeviceIcon,
257 addHostIcon: addHostIcon, 264 addHostIcon: addHostIcon,
258 iconConfig: function () { return config; }, 265 iconConfig: function () { return config; },
259 - sortIcons: sortIcons 266 + sortIcons: sortIcons,
267 + registerIconMapping: registerIconMapping
260 }; 268 };
261 }]); 269 }]);
262 270
......