Patch from tschaub to fix controls in IE.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2117 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -483,8 +483,10 @@ OpenLayers.Map.prototype = {
|
||||
control.setMap(this);
|
||||
var div = control.draw(px);
|
||||
if (div) {
|
||||
// only elements without parents should be appended to the viewport
|
||||
if(!div.parentNode) {
|
||||
// Only elements without parents should be appended to the viewport.
|
||||
// In IE, even elements without parents are given a parent node
|
||||
// of type 11 (DOCUMENT_FRAGMENT_NODE).
|
||||
if(!div.parentNode || (div.parentNode.nodeType == 11)) {
|
||||
div.style.zIndex = this.Z_INDEX_BASE['Control'] +
|
||||
this.controls.length;
|
||||
this.viewPortDiv.appendChild( div );
|
||||
|
||||
Reference in New Issue
Block a user