Remove canvasSize_ property
This commit is contained in:
@@ -7,7 +7,6 @@ goog.require('goog.dom');
|
||||
goog.require('goog.dom.TagName');
|
||||
goog.require('goog.style');
|
||||
goog.require('goog.vec.Mat4');
|
||||
goog.require('ol.Size');
|
||||
goog.require('ol.css');
|
||||
goog.require('ol.layer.Image');
|
||||
goog.require('ol.layer.Tile');
|
||||
@@ -48,12 +47,6 @@ ol.renderer.canvas.Map = function(container, map) {
|
||||
*/
|
||||
this.renderedVisible_ = true;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.Size}
|
||||
*/
|
||||
this.canvasSize_ = [container.clientHeight, container.clientWidth];
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {CanvasRenderingContext2D}
|
||||
@@ -104,10 +97,9 @@ ol.renderer.canvas.Map.prototype.renderFrame = function(frameState) {
|
||||
}
|
||||
|
||||
var size = frameState.size;
|
||||
if (!ol.size.equals(this.canvasSize_, size)) {
|
||||
if (!ol.size.equals([this.canvas_.width, this.canvas_.height], size)) {
|
||||
this.canvas_.width = size[0];
|
||||
this.canvas_.height = size[1];
|
||||
this.canvasSize_ = size;
|
||||
}
|
||||
|
||||
var context = this.context_;
|
||||
|
||||
Reference in New Issue
Block a user