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