Reduce closure dependency, fix GET issue
This commit is contained in:
@@ -7,7 +7,7 @@ var logoElement = document.createElement('a');
|
||||
logoElement.href = 'http://www.osgeo.org/';
|
||||
logoElement.target = '_blank';
|
||||
|
||||
var logoImage = new Image();
|
||||
var logoImage = document.createElement('img');
|
||||
logoImage.src = 'http://www.osgeo.org/sites/all/themes/osgeo/logo.png';
|
||||
|
||||
logoElement.appendChild(logoImage);
|
||||
|
||||
@@ -7452,7 +7452,7 @@ olx.view.FitOptions.prototype.maxZoom;
|
||||
* index: number,
|
||||
* layerStates: Object.<number, ol.layer.LayerState>,
|
||||
* layerStatesArray: Array.<ol.layer.LayerState>,
|
||||
* logos: Object.<string, string>,
|
||||
* logos: Object.<string, (string|Element)>,
|
||||
* pixelRatio: number,
|
||||
* pixelToCoordinateMatrix: ol.vec.Mat4.Number,
|
||||
* postRenderFunctions: Array.<ol.PostRenderFunction>,
|
||||
|
||||
@@ -303,15 +303,16 @@ ol.control.Attribution.prototype.insertLogos_ = function(frameState) {
|
||||
|
||||
var image, logoElement, logoKey;
|
||||
for (logoKey in logos) {
|
||||
var logoValue = logos[logoKey];
|
||||
if (logoValue instanceof HTMLElement) {
|
||||
this.logoLi_.appendChild(logoValue);
|
||||
logoElements[logoKey] = logoValue;
|
||||
}
|
||||
if (!(logoKey in logoElements)) {
|
||||
image = new Image();
|
||||
image.src = logoKey;
|
||||
var logoValue = logos[logoKey];
|
||||
if (logoValue === '') {
|
||||
logoElement = image;
|
||||
} else if (goog.dom.isElement(logoValue)) {
|
||||
goog.asserts.assertElement(logoValue);
|
||||
logoElement = logoValue;
|
||||
} else {
|
||||
logoElement = goog.dom.createDom('A', {
|
||||
'href': logoValue
|
||||
|
||||
@@ -1490,8 +1490,8 @@ ol.Map.createOptionsInternal = function(options) {
|
||||
var logo = options.logo;
|
||||
if (typeof logo === 'string') {
|
||||
logos[logo] = '';
|
||||
} else if (goog.dom.isElement(logo)) {
|
||||
logos['logo'] = logo;
|
||||
} else if (logo instanceof HTMLElement) {
|
||||
logos[goog.getUid(logo).toString()] = logo;
|
||||
} else if (goog.isObject(logo)) {
|
||||
goog.asserts.assertString(logo.href, 'logo.href should be a string');
|
||||
goog.asserts.assertString(logo.src, 'logo.src should be a string');
|
||||
|
||||
Reference in New Issue
Block a user