X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/e0013130c2ada6b534307c6a9a3658544ca2347b..9b04fb5789c46d35398ea87d723a9c579a54d4d6:/public/javascripts/site.js diff --git a/public/javascripts/site.js b/public/javascripts/site.js index 781940fa6..55d33d992 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -1,4 +1,4 @@ -function updatelinks(lon,lat,zoom) { +function updatelinks(lon,lat,zoom,layers) { var links = new Object(); links['viewanchor'] = '/index.html'; //links['editanchor'] = 'edit.html'; @@ -16,6 +16,7 @@ function updatelinks(lon,lat,zoom) { args["lat"] = lat; args["lon"] = lon; args["zoom"] = zoom; + args["layers"] = layers; node.href = setArgs(node.href, args); } @@ -69,3 +70,17 @@ function setArgs(url, args) { return url.replace(/\?.*$/, "") + "?" + queryitems.join("&"); } + +function getStyle(el, property) { + var style; + + if (el.currentStyle) { + style = el.currentStyle[property]; + } else if( window.getComputedStyle ) { + style = document.defaultView.getComputedStyle(el,null).getPropertyValue(property); + } else { + style = el.style[property]; + } + + return style; +}