Avoid VML rendering issues with zero area inner rings. We don't actually do an expensive area calculation, but just make sure that we have at least three distinct points. This version is slightly different from Tim's previous patch: it compares the VML path components rathter than the geometry components, which is less expensive and more reliable (because the VML path uses integers). p=tschaub,me r=me (closes #2876)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10837 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2010-10-15 13:47:35 +00:00
parent 2176013e24
commit 12d3c86eb4
3 changed files with 40 additions and 32 deletions

View File

@@ -164,7 +164,7 @@
});
draw = new OpenLayers.Control.DrawFeature(
poly, OpenLayers.Handler.Polygon,
{displayClass: "olControlDrawFeaturePoint", title: "Draw Features"}
{displayClass: "olControlDrawFeaturePoint", title: "Draw Features", handlerOptions: {holeModifier: "altKey"}}
);
modify = new OpenLayers.Control.ModifyFeature(
poly, {displayClass: "olControlModifyFeature", title: "Modify Features"}