MCPcopy
hub / github.com/metafizzy/flickity / checkCellPositions

Function checkCellPositions

test/unit/position-cells.js:14–28  ·  view source on GitHub ↗
( flkty, expecteds )

Source from the content-addressed store, hash-verified

12
13// loop through cells and check position values against expecteds
14function checkCellPositions( flkty, expecteds ) {
15 var isOK;
16 for ( var i = 0; i < expecteds.length; i++ ) {
17 var expected = expecteds[i];
18 var cell = flkty.cells[i];
19 var position = cell.element.style.left;
20 isOK = isPositionApprox( position, expected );
21 if ( !isOK ) {
22 console.error( 'wrong cell position, index: ' + i + '. ' +
23 'expected: ' + expected + '. position: ' + position );
24 break;
25 }
26 }
27 return isOK;
28}
29
30QUnit.test( 'position cells', function( assert ) {
31

Callers 1

position-cells.jsFile · 0.70

Calls 1

isPositionApproxFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…