Documentation and tests to close #259 .
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1605 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -5,3 +5,4 @@ Utility class. Stores a bunch of methods and settings that don't fit anywhere el
|
|||||||
* Options
|
* Options
|
||||||
|
|
||||||
OpenLayers.Util.onImageLoadErrorColor -- A string to set img.style.backgroundColor to if the onerror event fires for the image (useful for 500 errors from WMS, for example).
|
OpenLayers.Util.onImageLoadErrorColor -- A string to set img.style.backgroundColor to if the onerror event fires for the image (useful for 500 errors from WMS, for example).
|
||||||
|
OpenLayers.ImgPath -- A string to be used as the base for images for controls and the like. Should end with '/'.
|
||||||
|
|||||||
@@ -479,7 +479,16 @@
|
|||||||
resolution = OpenLayers.Util.getResolutionFromScale(scale);
|
resolution = OpenLayers.Util.getResolutionFromScale(scale);
|
||||||
t.eq(OpenLayers.Util.getScaleFromResolution(resolution), scale, "scale->resolution->scale works");
|
t.eq(OpenLayers.Util.getScaleFromResolution(resolution), scale, "scale->resolution->scale works");
|
||||||
}
|
}
|
||||||
|
function test_14_Util_getImgLocation(t) {
|
||||||
|
t.plan(3);
|
||||||
|
OpenLayers.ImgPath = "foo/";
|
||||||
|
t.eq(OpenLayers.Util.getImagesLocation(), "foo/", "ImgPath works as expected.");
|
||||||
|
OpenLayers.ImgPath = null;
|
||||||
|
t.eq(OpenLayers.Util.getImagesLocation().substr(OpenLayers.Util.getImagesLocation().length-4,4), "img/", "ImgPath works as expected when not set.");
|
||||||
|
|
||||||
|
OpenLayers.ImgPath = '';
|
||||||
|
t.eq(OpenLayers.Util.getImagesLocation().substr(OpenLayers.Util.getImagesLocation().length-4,4), "img/", "ImgPath works as expected when set to ''.");
|
||||||
|
}
|
||||||
// -->
|
// -->
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user