MCPcopy
hub / github.com/dc-js/dc.js / itShouldVerticallyCenterLabelWithinRow

Function itShouldVerticallyCenterLabelWithinRow

spec/row-chart-spec.js:247–254  ·  view source on GitHub ↗
(i)

Source from the content-addressed store, hash-verified

245 });
246
247 function itShouldVerticallyCenterLabelWithinRow (i) {
248 it(`should place label ${i} within row ${i}`, () => {
249 const rowpos = rows.nodes()[i].getBoundingClientRect(),
250 textpos = labels.nodes()[i].getBoundingClientRect();
251 expect((textpos.top + textpos.bottom) / 2)
252 .toBeWithinDelta((rowpos.top + rowpos.bottom) / 2, 2);
253 });
254 }
255 for (let i = 0; i < N ; ++i) {
256 itShouldVerticallyCenterLabelWithinRow(i);
257 }

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…