diff --git a/demos/side-by-side/index.html.in b/demos/side-by-side/index.html.in index 75d65daab2..91724e3762 100644 --- a/demos/side-by-side/index.html.in +++ b/demos/side-by-side/index.html.in @@ -63,7 +63,7 @@

Notes: the two maps share the same center, resolution, rotation and layers. Currently the DOM map does not support rotation.

Console tips: If you want to play around with the API in the console, first make sure that you're using the simple optimizations version of this demo, then open a console and experiment with the domMap, webglMap and layer variables in the console. The source code is in side-by-side.js.

-

Known bugs: Dragging is captured on the entire page, not just on the maps. When the map is rotated, panning on the WebGL map doesn't work as expected.

+

Known bugs: When the map is rotated, panning on the WebGL map doesn't work as expected.

diff --git a/src/ol/base/map.js b/src/ol/base/map.js index 66fd91ff56..ad53eb213a 100644 --- a/src/ol/base/map.js +++ b/src/ol/base/map.js @@ -1,4 +1,3 @@ -// FIXME dragger - prevent page scrolling // FIXME better map browser event types // FIXME recheck layer/map projection compatability when projection changes // FIXME layer renderers should skip when they can't reproject @@ -117,8 +116,9 @@ ol.Map = function(target, opt_values, opt_viewportSizeMonitor) { this.eventsPane_ = goog.dom.createElement(goog.dom.TagName.DIV); this.eventsPane_.className = 'ol-pane-events'; this.eventsPane_.style.position = 'absolute'; - this.eventsPane_.style.width = '100%'; - this.eventsPane_.style.height = '100%'; + // FIXME why can't we use width and height 100% here? + this.eventsPane_.style.width = target.clientWidth + 'px'; + this.eventsPane_.style.height = target.clientHeight + 'px'; this.eventsPane_.style.zIndex = ol.MapPaneZIndex.EVENTS; goog.dom.appendChild(target, this.eventsPane_);