Refactor constraints static methods to module functions

This commit is contained in:
Björn Harrtell
2018-02-14 18:21:56 +01:00
parent 18fa8ddc58
commit 208ca098f2
9 changed files with 46 additions and 54 deletions
+6 -6
View File
@@ -1,14 +1,14 @@
import ResolutionConstraint from '../../../src/ol/ResolutionConstraint.js';
import {createSnapToResolutions, createSnapToPower} from '../../../src/ol/resolutionconstraint.js';
describe('ol.ResolutionConstraint', function() {
describe('ol.resolutionconstraint', function() {
describe('SnapToResolution', function() {
let resolutionConstraint;
beforeEach(function() {
resolutionConstraint = ResolutionConstraint.createSnapToResolutions(
resolutionConstraint = createSnapToResolutions(
[1000, 500, 250, 100]);
});
@@ -46,7 +46,7 @@ describe('ol.ResolutionConstraint', function() {
beforeEach(function() {
resolutionConstraint =
ResolutionConstraint.createSnapToResolutions(
createSnapToResolutions(
[1000, 500, 250, 100]);
});
@@ -96,7 +96,7 @@ describe('ol.ResolutionConstraint', function() {
beforeEach(function() {
resolutionConstraint =
ResolutionConstraint.createSnapToPower(2, 1024, 10);
createSnapToPower(2, 1024, 10);
});
describe('delta 0', function() {
@@ -154,7 +154,7 @@ describe('ol.ResolutionConstraint', function() {
beforeEach(function() {
resolutionConstraint =
ResolutionConstraint.createSnapToPower(2, 1024, 10);
createSnapToPower(2, 1024, 10);
});
describe('delta 0, direction 0', function() {