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

Function brushed

scripts/bot.js:167–180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

165 }
166
167 function brushed() {
168 var value = brush.extent()[0];
169
170 if (d3.event.sourceEvent && d3.mouse(this)[0]) { // not a programmatic event
171 value = x.invert(d3.mouse(this)[0]);
172 brush.extent([value, value]);
173 }
174
175 handle.attr("cx", x(value));
176
177 if(config.onbrush) {
178 label.text(config.onbrush.call(this, value));
179 }
180 }
181 }
182
183 robot.speak = function(text) {

Callers

nothing calls this directly

Calls 2

invertMethod · 0.80
xFunction · 0.50

Tested by

no test coverage detected