Properly destroy features in the polygon handler. Many thanks to fredj who has caubht these issues, provided clear patches, and written solid tests. More please. (Closes #934)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4076 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -64,8 +64,9 @@ OpenLayers.Handler.Polygon = OpenLayers.Class(OpenLayers.Handler.Path, {
|
|||||||
* Destroy temporary geometries
|
* Destroy temporary geometries
|
||||||
*/
|
*/
|
||||||
destroyFeature: function() {
|
destroyFeature: function() {
|
||||||
|
OpenLayers.Handler.Path.prototype.destroyFeature.apply(this);
|
||||||
this.polygon.destroy();
|
this.polygon.destroy();
|
||||||
this.point.destroy();
|
this.polygon = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -75,5 +75,6 @@
|
|||||||
<li>Handler/test_Drag.html</li>
|
<li>Handler/test_Drag.html</li>
|
||||||
<li>Handler/test_Point.html</li>
|
<li>Handler/test_Point.html</li>
|
||||||
<li>Handler/test_Path.html</li>
|
<li>Handler/test_Path.html</li>
|
||||||
|
<li>Handler/test_Polygon.html</li>
|
||||||
<li>test_Map.html</li>
|
<li>test_Map.html</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user