GUI -- Sketching out GlyphService.
- Added areFunctions() to FnService.
- First unit test for GlyphService.
- Added note about debugging unit tests.
Change-Id: I377b6a1cf1845fb57e506e1a935970b49dbf0bbb
diff --git a/web/gui/src/main/webapp/app/fw/svg/glyph.js b/web/gui/src/main/webapp/app/fw/svg/glyph.js
index ab540a1..1775a11 100644
--- a/web/gui/src/main/webapp/app/fw/svg/glyph.js
+++ b/web/gui/src/main/webapp/app/fw/svg/glyph.js
@@ -22,14 +22,38 @@
(function () {
'use strict';
- var $log;
+ var $log,
+ glyphs = d3.map();
angular.module('onosSvg')
.factory('GlyphService', ['$log', function (_$log_) {
$log = _$log_;
+
+ function init() {
+ // TODO: load the core set of glyphs
+
+ }
+
+ function register(viewBox, data, overwrite) {
+ // TODO: register specified glyph definitions
+
+ }
+
+ function ids() {
+ return glyphs.keys();
+ }
+
+ function loadDefs(defs) {
+ // TODO: clear defs element, then load all glyph definitions
+
+ }
+
return {
- tbd: function () {}
+ init: init,
+ register: register,
+ ids: ids,
+ loadDefs: loadDefs
};
}]);