MCPcopy Index your code
hub / github.com/plotly/plotly.js / assertItemDims

Function assertItemDims

test/jasmine/tests/updatemenus_test.js:868–879  ·  view source on GitHub ↗
(node, width, height)

Source from the content-addressed store, hash-verified

866 }
867
868 function assertItemDims(node, width, height) {
869 var rect = node.select('rect');
870 var actualWidth = +rect.attr('width');
871
872 // must compare with a tolerance as the exact result
873 // is browser/font dependent (via getBBox)
874 expect(Math.abs(actualWidth - width)).toBeLessThan(16);
875
876 // height is determined by 'fontsize',
877 // so no such tolerance is needed
878 expect(+rect.attr('height')).toEqual(height);
879 }
880
881 function click(selection) {
882 return new Promise(function(resolve) {

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…