Add a snapToZero rotation constraint

This commit is contained in:
Éric Lemoine
2013-03-04 19:21:41 +01:00
parent 7d6d82519b
commit 1776d80cb9
4 changed files with 67 additions and 1 deletions

View File

@@ -49,6 +49,16 @@ describe('ol.View2D', function() {
});
});
describe('create rotation constraint', function() {
it('gives a correct rotation constraint function', function() {
var options = {};
var fn = ol.View2D.createConstraints_(options).rotation;
expect(fn(0.01, 0)).toEqual(0);
expect(fn(0.15, 0)).toEqual(0.15);
});
});
});
});