GUI -- Revamp of the Glyph Service to allow for custom viewboxes to be defined for registered glyphs/sprites.
- Also, initial sketch for externally injected sprite definition and placement.
- Added 'cloud' sprite data.
Change-Id: I1c38d50212a6d67e00e9b7c15427f6e0af40b539
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index f40beb1..b16cb6d 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -247,6 +247,25 @@
.attr('opacity', b ? 1 : 0);
}
+ function addSprites() {
+ var g = zoomLayer.append ('g').attr('id', 'topo-sprites');
+
+ function cloud(g, x, y) {
+ g.append('use').attr({
+ width: 100,
+ height: 100,
+ 'xlink:href': '#cloud',
+ transform: sus.translate([x, y]) + sus.scale(4,4)
+ }).style('stroke', 'goldenrod')
+ .style('fill', 'none')
+ .style('stroke-width', 1.0);
+ }
+
+ cloud(g, 0, 50);
+ cloud(g, 800, 40);
+ cloud(g, 400, 450);
+ }
+
// --- User Preferemces ----------------------------------------------
var prefsState = {};
@@ -354,6 +373,7 @@
toggleMap(prefsState.bg);
}
);
+ // addSprites();
forceG = zoomLayer.append('g').attr('id', 'topo-force');
tfs.initForce(svg, forceG, uplink, dim);