change map.addControlToMap to allow controls outside viewport, from
Ticket #445: externalControl.patch. Closes #445. git-svn-id: http://svn.openlayers.org/trunk/openlayers@2087 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -483,9 +483,12 @@ OpenLayers.Map.prototype = {
|
||||
control.setMap(this);
|
||||
var div = control.draw(px);
|
||||
if (div) {
|
||||
div.style.zIndex = this.Z_INDEX_BASE['Control'] +
|
||||
this.controls.length;
|
||||
this.viewPortDiv.appendChild( div );
|
||||
// only elements without parents should be appended to the viewport
|
||||
if(!div.parentNode) {
|
||||
div.style.zIndex = this.Z_INDEX_BASE['Control'] +
|
||||
this.controls.length;
|
||||
this.viewPortDiv.appendChild( div );
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user