give Control classes same setMap() functionality as Layer

git-svn-id: http://svn.openlayers.org/trunk/openlayers@936 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-07-12 00:16:14 +00:00
parent a52b1fc8f1
commit ec33ac4a84
2 changed files with 11 additions and 1 deletions

View File

@@ -318,7 +318,7 @@ OpenLayers.Map.prototype = {
* @param {OpenLayers.Pixel} px
*/
addControl: function (control, px) {
control.map = this;
control.setMap(this);
this.controls.push(control);
var div = control.draw(px);
if (div) {