fixing typo

This commit is contained in:
Max Ogden 2011-05-23 12:33:03 -07:00
parent 21184e2f48
commit f12fb251a0

View File

@ -1,50 +1,50 @@
L.Map.include({
addControl: function(control) {
control.onAdd(this);
var pos = control.getPosition(),
corner = this._controlCorners[pos],
container = control.getContainer();
L.DomUtil.addClass(container, 'leaflet-control');
if (pos.indexOf('bottom') != -1) {
corner.insertBefore(container, corner.firstChild);
} else {
corner.appendChild(container);
}
return this;
},
removeControl: function(conrol) {
var pos = control.getPosition(),
corner = this._controlCorners[pos],
container = control.getContainer();
corner.removeChild(container);
if (control.onRemove) {
control.onRemove(this);
}
return this;
},
_initControlPos: function() {
var corners = this._controlCorners = {},
classPart = 'leaflet-',
top = classPart + 'top',
bottom = classPart + 'bottom',
left = classPart + 'left',
right = classPart + 'right',
controlContainer = L.DomUtil.create('div', classPart + 'control-container', this._container);
if (L.Browser.mobileWebkit) {
controlContainer.className += ' ' + classPart + 'big-buttons';
}
corners.topLeft = L.DomUtil.create('div', top + ' ' + left, controlContainer);
corners.topRight = L.DomUtil.create('div', top + ' ' + right, controlContainer);
corners.bottomLeft = L.DomUtil.create('div', bottom + ' ' + left, controlContainer);
corners.bottomRight = L.DomUtil.create('div', bottom + ' ' + right, controlContainer);
}
L.Map.include({
addControl: function(control) {
control.onAdd(this);
var pos = control.getPosition(),
corner = this._controlCorners[pos],
container = control.getContainer();
L.DomUtil.addClass(container, 'leaflet-control');
if (pos.indexOf('bottom') != -1) {
corner.insertBefore(container, corner.firstChild);
} else {
corner.appendChild(container);
}
return this;
},
removeControl: function(control) {
var pos = control.getPosition(),
corner = this._controlCorners[pos],
container = control.getContainer();
corner.removeChild(container);
if (control.onRemove) {
control.onRemove(this);
}
return this;
},
_initControlPos: function() {
var corners = this._controlCorners = {},
classPart = 'leaflet-',
top = classPart + 'top',
bottom = classPart + 'bottom',
left = classPart + 'left',
right = classPart + 'right',
controlContainer = L.DomUtil.create('div', classPart + 'control-container', this._container);
if (L.Browser.mobileWebkit) {
controlContainer.className += ' ' + classPart + 'big-buttons';
}
corners.topLeft = L.DomUtil.create('div', top + ' ' + left, controlContainer);
corners.topRight = L.DomUtil.create('div', top + ' ' + right, controlContainer);
corners.bottomLeft = L.DomUtil.create('div', bottom + ' ' + left, controlContainer);
corners.bottomRight = L.DomUtil.create('div', bottom + ' ' + right, controlContainer);
}
});