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

Function gripXFrac

test/jasmine/tests/sliders_test.js:421–429  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

419
420 it('only draws visible steps', function(done) {
421 function gripXFrac() {
422 var grip = document.querySelector('.' + constants.gripRectClass);
423 var transform = grip.attributes.transform.value;
424 var gripX = +(transform.split('(')[1].split(',')[0]);
425 var rail = document.querySelector('.' + constants.railRectClass);
426 var railWidth = +rail.attributes.width.value;
427 var railRX = +rail.attributes.rx.value;
428 return gripX / (railWidth - 2 * railRX);
429 }
430 function assertSlider(ticks, labels, gripx, active) {
431 assertNodeCount('.' + constants.groupClassName, 1);
432 assertNodeCount('.' + constants.tickRectClass, ticks);

Callers 1

assertSliderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…