Improve routing rule drag handling and controls
This commit is contained in:
@@ -26,6 +26,8 @@ test('center crossing moves one or many slots without changing stable row identi
|
||||
assert.equal(crossedRuleIndex(0, 149, [100, 150, 200]), 0);
|
||||
assert.equal(crossedRuleIndex(0, 151, [100, 150, 200]), 1);
|
||||
assert.equal(crossedRuleIndex(0, 201, [100, 150, 200]), 2);
|
||||
assert.equal(crossedRuleIndex(2, 149, [100, 150, 200]), 1);
|
||||
assert.equal(crossedRuleIndex(2, 99, [100, 150, 200]), 0);
|
||||
const moved = moveRule(rules, 0, 2);
|
||||
assert.deepEqual(moved.map(({ _key }) => _key), ['b', 'c', 'a']);
|
||||
assert.strictEqual(moved[2], rules[0]);
|
||||
|
||||
Reference in New Issue
Block a user