Redefine ol.Pixel to be Array.<number>

This commit is contained in:
Frederic Junod
2013-04-05 11:56:39 +02:00
parent 075f4aadc7
commit be081fd44e
13 changed files with 38 additions and 48 deletions

View File

@@ -279,7 +279,7 @@ ol.Overlay.prototype.updatePixelPosition_ = function() {
if (this.rendered_.left_ !== '') {
this.rendered_.left_ = style.left = '';
}
var right = Math.round(mapSize.width - pixel.x) + 'px';
var right = Math.round(mapSize.width - pixel[0]) + 'px';
if (this.rendered_.right_ != right) {
this.rendered_.right_ = style.right = right;
}
@@ -287,7 +287,7 @@ ol.Overlay.prototype.updatePixelPosition_ = function() {
if (this.rendered_.right_ !== '') {
this.rendered_.right_ = style.right = '';
}
var left = Math.round(pixel.x) + 'px';
var left = Math.round(pixel[0]) + 'px';
if (this.rendered_.left_ != left) {
this.rendered_.left_ = style.left = left;
}
@@ -297,7 +297,7 @@ ol.Overlay.prototype.updatePixelPosition_ = function() {
if (this.rendered_.bottom_ !== '') {
this.rendered_.bottom_ = style.bottom = '';
}
var top = Math.round(pixel.y) + 'px';
var top = Math.round(pixel[1]) + 'px';
if (this.rendered_.top_ != top) {
this.rendered_.top_ = style.top = top;
}
@@ -305,7 +305,7 @@ ol.Overlay.prototype.updatePixelPosition_ = function() {
if (this.rendered_.top_ !== '') {
this.rendered_.top_ = style.top = '';
}
var bottom = Math.round(mapSize.height - pixel.y) + 'px';
var bottom = Math.round(mapSize.height - pixel[1]) + 'px';
if (this.rendered_.bottom_ != bottom) {
this.rendered_.bottom_ = style.bottom = bottom;
}