Use overlay container instead of viewport for ol.render.Box

This commit is contained in:
Andreas Hocevar
2015-10-15 20:22:14 +02:00
parent fcdff1c841
commit 2d50511527
2 changed files with 6 additions and 3 deletions

View File

@@ -26,13 +26,16 @@ describe('ol.render.Box', function() {
document.body.removeChild(target);
});
describe('Constructor', function() {
describe('constructor', function() {
it('creates an absolutely positioned DIV with a className', function() {
expect(box.element_).to.be.a(HTMLDivElement);
expect(box.element_.style.position).to.be('absolute');
expect(box.element_.className).to.be('ol-box test-box');
expect(box.element_.style.position).to.be('absolute');
});
it('appends the DIV to the map\'s overlay container', function() {
expect(box.element_.parentNode).to.equal(map.getOverlayContainer());
});
});
describe('#setPixels()', function() {