(selection)
| 334 | } |
| 335 | |
| 336 | function attachDragBehavior(selection) { |
| 337 | // There's some fiddling with pointer cursor styling so that the cursor preserves its shape while dragging a brush |
| 338 | // even if the cursor strays from the interacting bar, which is bound to happen as bars are thin and the user |
| 339 | // will inevitably leave the hotspot strip. In this regard, it does something similar to what the D3 brush would do. |
| 340 | selection |
| 341 | .on('mousemove', function(d) { |
| 342 | d3.event.preventDefault(); |
| 343 | if(!d.parent.inBrushDrag) mousemove(this, d); |
| 344 | }) |
| 345 | .on('mouseleave', function(d) { |
| 346 | if(!d.parent.inBrushDrag) clearCursor(); |
| 347 | }) |
| 348 | .call(d3.behavior.drag() |
| 349 | .on('dragstart', function(d) { dragstart(this, d); }) |
| 350 | .on('drag', function(d) { drag(this, d); }) |
| 351 | .on('dragend', function(d) { dragend(this, d); }) |
| 352 | ); |
| 353 | } |
| 354 | |
| 355 | function startAsc(a, b) { return a[0] - b[0]; } |
| 356 |
nothing calls this directly
no test coverage detected
searching dependent graphs…