Merge pull request #497 from fredj/coding-style
coding style: declare new arrays using []
This commit is contained in:
@@ -285,11 +285,9 @@ OpenLayers.Event = {
|
|||||||
if (elementObservers) {
|
if (elementObservers) {
|
||||||
for(var i = elementObservers.length-1; i >= 0; i--) {
|
for(var i = elementObservers.length-1; i >= 0; i--) {
|
||||||
var entry = elementObservers[i];
|
var entry = elementObservers[i];
|
||||||
var args = new Array(entry.element,
|
OpenLayers.Event.stopObserving.apply(this, [
|
||||||
entry.name,
|
entry.element, entry.name, entry.observer, entry.useCapture
|
||||||
entry.observer,
|
]);
|
||||||
entry.useCapture);
|
|
||||||
var removed = OpenLayers.Event.stopObserving.apply(this, args);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -107,11 +107,8 @@ OpenLayers.Popup.Anchored =
|
|||||||
moveTo: function(px) {
|
moveTo: function(px) {
|
||||||
var oldRelativePosition = this.relativePosition;
|
var oldRelativePosition = this.relativePosition;
|
||||||
this.relativePosition = this.calculateRelativePosition(px);
|
this.relativePosition = this.calculateRelativePosition(px);
|
||||||
|
|
||||||
var newPx = this.calculateNewPx(px);
|
OpenLayers.Popup.prototype.moveTo.call(this, this.calculateNewPx(px));
|
||||||
|
|
||||||
var newArguments = new Array(newPx);
|
|
||||||
OpenLayers.Popup.prototype.moveTo.apply(this, newArguments);
|
|
||||||
|
|
||||||
//if this move has caused the popup to change its relative position,
|
//if this move has caused the popup to change its relative position,
|
||||||
// we need to make the appropriate cosmetic changes.
|
// we need to make the appropriate cosmetic changes.
|
||||||
|
|||||||
Reference in New Issue
Block a user