Fixed fatal typo that broke getComponentString when working with two-point geometries. Added tests to check that everything works as expected now. r=pagameba (pullup #1730)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@8016 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2008-09-15 11:51:50 +00:00
parent 508ebc58c1
commit 658953b130
2 changed files with 19 additions and 6 deletions

View File

@@ -661,7 +661,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
// If so, add the coordinate of the intersection with the
// valid range bounds.
if (i > 0) {
if (this.getShortString(components[i + 1])) {
if (this.getShortString(components[i - 1])) {
strings.push(this.clipLine(components[i],
components[i-1]));
}