Don't set the canvas size too early
This commit is contained in:
@@ -36,8 +36,6 @@ ol.renderer.canvas.Map = function(container, map) {
|
|||||||
*/
|
*/
|
||||||
this.canvas_ = /** @type {HTMLCanvasElement} */
|
this.canvas_ = /** @type {HTMLCanvasElement} */
|
||||||
(goog.dom.createElement(goog.dom.TagName.CANVAS));
|
(goog.dom.createElement(goog.dom.TagName.CANVAS));
|
||||||
this.canvas_.height = container.clientHeight;
|
|
||||||
this.canvas_.width = container.clientWidth;
|
|
||||||
this.canvas_.className = ol.css.CLASS_UNSELECTABLE;
|
this.canvas_.className = ol.css.CLASS_UNSELECTABLE;
|
||||||
goog.dom.insertChildAt(container, this.canvas_, 0);
|
goog.dom.insertChildAt(container, this.canvas_, 0);
|
||||||
|
|
||||||
|
|||||||
@@ -71,8 +71,6 @@ ol.renderer.webgl.Map = function(container, map) {
|
|||||||
*/
|
*/
|
||||||
this.canvas_ = /** @type {HTMLCanvasElement} */
|
this.canvas_ = /** @type {HTMLCanvasElement} */
|
||||||
(goog.dom.createElement(goog.dom.TagName.CANVAS));
|
(goog.dom.createElement(goog.dom.TagName.CANVAS));
|
||||||
this.canvas_.height = container.clientHeight;
|
|
||||||
this.canvas_.width = container.clientWidth;
|
|
||||||
this.canvas_.className = ol.css.CLASS_UNSELECTABLE;
|
this.canvas_.className = ol.css.CLASS_UNSELECTABLE;
|
||||||
goog.dom.insertChildAt(container, this.canvas_, 0);
|
goog.dom.insertChildAt(container, this.canvas_, 0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user