Merge branch '2.12'

This commit is contained in:
Éric Lemoine
2012-05-02 17:11:37 +02:00
9 changed files with 156 additions and 11 deletions
+1 -1
View File
@@ -414,4 +414,4 @@
/**
* Constant: VERSION_NUMBER
*/
OpenLayers.VERSION_NUMBER="Release 2.12-rc1";
OpenLayers.VERSION_NUMBER="Release 2.12-rc2";
+5
View File
@@ -1292,6 +1292,11 @@ OpenLayers.Layer = OpenLayers.Class({
var childNodes = this.div.childNodes;
for(var i = 0, len = childNodes.length; i < len; ++i) {
var element = childNodes[i].firstChild || childNodes[i];
var lastChild = childNodes[i].lastChild;
//TODO de-uglify this
if (lastChild && lastChild.nodeName.toLowerCase() === "iframe") {
element = lastChild.parentNode;
}
OpenLayers.Util.modifyDOMElement(element, null, null, null,
null, null, null, opacity);
}
+4 -2
View File
@@ -1634,8 +1634,10 @@ OpenLayers.Map = OpenLayers.Class({
this.panTo(newCenterLonLat);
} else {
this.moveTo(newCenterLonLat);
this.dragging = false;
this.events.triggerEvent("moveend");
if(this.dragging) {
this.dragging = false;
this.events.triggerEvent("moveend");
}
}
}
}
+1 -1
View File
@@ -7,7 +7,7 @@ var OpenLayers = {
/**
* Constant: VERSION_NUMBER
*/
VERSION_NUMBER: "Release 2.12-rc1",
VERSION_NUMBER: "Release 2.12-rc2",
/**
* Constant: singleFile
+10 -6
View File
@@ -211,7 +211,8 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
*/
positionTile: function() {
var style = this.getTile().style,
size = this.layer.getImageSize(this.bounds);
size = this.frame ? this.size :
this.layer.getImageSize(this.bounds);
style.left = this.position.x + "%";
style.top = this.position.y + "%";
style.width = size.w + "%";
@@ -254,11 +255,16 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
this.imgDiv.galleryImg = "no";
var style = this.imgDiv.style;
if (this.layer.gutter) {
var left = this.layer.gutter / this.layer.tileSize.w * 100;
var top = this.layer.gutter / this.layer.tileSize.h * 100;
if (this.frame) {
var left = 0, top = 0;
if (this.layer.gutter) {
left = this.layer.gutter / this.layer.tileSize.w * 100;
top = this.layer.gutter / this.layer.tileSize.h * 100;
}
style.left = -left + "%";
style.top = -top + "%";
style.width = (2 * left + 100) + "%";
style.height = (2 * top + 100) + "%";
}
style.visibility = "hidden";
style.opacity = 0;
@@ -275,8 +281,6 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, {
style.width = "100%";
}
if (this.frame) {
style.width = "100%";
style.height = "100%";
this.frame.appendChild(this.imgDiv);
}
}
+13
View File
@@ -196,6 +196,19 @@ OpenLayers.Tile.Image.IFrame = {
OpenLayers.Tile.Image.prototype.setImgSrc.apply(this, arguments);
}
},
/**
* Method: onImageLoad
* Handler for the image onload event
*/
onImageLoad: function() {
//TODO de-uglify opacity handling
OpenLayers.Tile.Image.prototype.onImageLoad.apply(this, arguments);
if (this.useIFrame === true) {
this.imgDiv.style.opacity = 1;
this.frame.style.opacity = this.layer.opacity;
}
},
/**
* Method: createBackBuffer