MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / addAlert

Function addAlert

modules/crapplets/crapplets.js:83–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81 }
82
83 function addAlert() {
84
85 var x = d3.random.normal(module.sel.node().offsetWidth / 2, module.sel.node().offsetWidth / 5);
86 var y = d3.random.normal(module.sel.node().offsetHeight / 2, module.sel.node().offsetHeight / 5);
87
88 container.append("img").attr("src", "modules/crapplets/img/alerts/" + _.sample(alerts))
89 .style("left", x() + "px")
90 .style("top", y() + "px");
91 }
92
93})();

Callers 1

makeItWorseFunction · 0.85

Calls 2

xFunction · 0.50
yFunction · 0.50

Tested by

no test coverage detected