[TASK] Remove iframe for stats

This commit is contained in:
Xaver Maierhofer 2017-02-05 22:42:59 +01:00
parent 6505f5491d
commit 39f40a3dcf
No known key found for this signature in database
GPG Key ID: 7FDCE23FD2EC9FE8
1 changed files with 1 additions and 44 deletions

View File

@ -152,41 +152,6 @@ define({
return td;
},
createIframe: function createIframe(opt, width, height) {
var el = document.createElement('iframe');
width = typeof width !== 'undefined' ? width : '525px';
height = typeof height !== 'undefined' ? height : '350px';
if (opt.src) {
el.src = opt.src;
} else {
el.src = opt;
}
if (opt.frameBorder) {
el.frameBorder = opt.frameBorder;
} else {
el.frameBorder = 1;
}
if (opt.width) {
el.width = opt.width;
} else {
el.width = width;
}
if (opt.height) {
el.height = opt.height;
} else {
el.height = height;
}
el.scrolling = 'no';
el.seamless = 'seamless';
return el;
},
showStat: function showStat(o, subst) {
var content;
var caption;
@ -205,15 +170,6 @@ define({
}
}
if (o.iframe) {
content = require('helper').createIframe(o.iframe, o.width, o.height);
if (o.iframe.src) {
content.src = require('helper').listReplace(o.iframe.src, subst);
} else {
content.src = require('helper').listReplace(o.iframe, subst);
}
}
var p = document.createElement('p');
if (o.href) {
@ -233,6 +189,7 @@ define({
return p;
},
getTileBBox: function getTileBBox(s, map, tileSize, margin) {
var tl = map.unproject([s.x - margin, s.y - margin]);
var br = map.unproject([s.x + margin + tileSize, s.y + margin + tileSize]);