Merge branch 'three' of https://github.com/tschaub/openlayers into three
Conflicts: src/api/loc.js src/api/map.js src/ol/Map.js
This commit is contained in:
@@ -1,18 +1,25 @@
|
||||
describe("ol.Loc", function() {
|
||||
|
||||
it("allows flexible construction", function() {
|
||||
it("allows empty construction", function() {
|
||||
var loc;
|
||||
|
||||
// nowhere
|
||||
loc = ol.loc();
|
||||
expect(loc instanceof ol.Loc).toBe(true);
|
||||
});
|
||||
|
||||
it("allows construction from an obj config", function() {
|
||||
var loc;
|
||||
|
||||
// obj config
|
||||
loc = ol.loc({x: 10, y: 20});
|
||||
|
||||
expect(loc.x()).toBe(10);
|
||||
expect(loc.y()).toBe(20);
|
||||
});
|
||||
|
||||
it("allows construction from an array config", function() {
|
||||
var loc;
|
||||
// array config
|
||||
loc = ol.loc([30, 40]);
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ describe("ol.Map", function() {
|
||||
|
||||
center = map.center();
|
||||
zoom = map.zoom();
|
||||
expect(center.x().toFixed(3)).toBe("4.000");
|
||||
expect(center.y().toFixed(3)).toBe("5.000");
|
||||
expect(center.x().toFixed(3)).toBe("1.000");
|
||||
expect(center.y().toFixed(3)).toBe("2.000");
|
||||
expect(zoom).toBe(6);
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user